mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
uwb: hwa-rc: fix memory leak at probe
[ Upstream commit 11b71782c1
]
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: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
16d5a6d9c6
commit
ee6dc27c53
1 changed files with 1 additions and 0 deletions
|
@ -873,6 +873,7 @@ static int hwarc_probe(struct usb_interface *iface,
|
|||
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:
|
||||
|
|
Loading…
Reference in a new issue