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

usb: misc: legousbtower: Fix memory leak

commit 0bd193d6 upstream.

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 cfd3c22c
......@@ -941,6 +941,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:
......
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