usb: misc: legousbtower: Fix memory leak

get_version_reply is not freed if function returns with success.

Fixes: 942a48730f ("usb: misc: legousbtower: Fix buffers on stack")
Reported-by: Heikki Krogerus <[email protected]>
Signed-off-by: Maksim Salau <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Maksim Salau 2017-05-13 23:49:26 +03:00 • committed by Greg Kroah-Hartman
commit 0bd193d62b

View file

@ -926,6 +926,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
USB_MAJOR, dev->minor);
exit:
kfree(get_version_reply);
return retval;
error: