summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorMaksim Salau <maksim.salau@gmail.com>2017-05-13 23:49:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-17 11:27:41 +0200
commit0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3 (patch)
treeb0dbf8e4281c5ade54e073dc9d0042a209c0282d /drivers/usb
parent2f964780c03b73de269b08d12aff96a9618d13f3 (diff)
usb: misc: legousbtower: Fix memory leak
get_version_reply is not freed if function returns with success. Fixes: 942a48730faf ("usb: misc: legousbtower: Fix buffers on stack") Reported-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Maksim Salau <maksim.salau@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/misc/legousbtower.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index aa3c280fdf8d..0782ac6f5edf 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -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: