Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81f7ce1d authored by Anton Vasilyev's avatar Anton Vasilyev Committed by Greg Kroah-Hartman
Browse files

uwb: hwa-rc: fix memory leak at probe



[ Upstream commit 11b71782c1d10d9bccc31825cf84291cd7588a1e ]

hwarc_probe() allocates memory for hwarc, but does not free it
if uwb_rc_add() or hwarc_get_version() fail.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: default avatarAnton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9628ed40
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -875,6 +875,7 @@ error_get_version:
error_rc_add:
	usb_put_intf(iface);
	usb_put_dev(hwarc->usb_dev);
	kfree(hwarc);
error_alloc:
	uwb_rc_put(uwb_rc);
error_rc_alloc: