Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Salau <maksim.salau@gmail.com>2017-05-13 23:49:26 +0300
committerBen Hutchings <ben@decadent.org.uk>2017-08-26 02:14:50 +0100
commit14216e1b76cc041165baefa18bfa6af229f863b3 (patch)
tree82a6496dea0882f3fc1c07a371671bb0396905c3
parent08676246d893e3a42a541a2ef1291f2ea62c5b06 (diff)
usb: misc: legousbtower: Fix memory leak
commit 0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3 upstream. 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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-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 5f5b626c2dd7..0f9b094343f5 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -953,6 +953,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: