Commit 0bd193d6 authored by Maksim Salau's avatar Maksim Salau Committed by Greg Kroah-Hartman

usb: misc: legousbtower: Fix memory leak

get_version_reply is not freed if function returns with success.

Fixes: 942a4873 ("usb: misc: legousbtower: Fix buffers on stack")
Reported-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarMaksim Salau <maksim.salau@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2f964780
...@@ -926,6 +926,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device ...@@ -926,6 +926,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
USB_MAJOR, dev->minor); USB_MAJOR, dev->minor);
exit: exit:
kfree(get_version_reply);
return retval; return retval;
error: error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment