Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
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-25 14:18:02 +0200
commit5d5ea13896c83d3c9ad9fa3c4ae8cd76045edf44 (patch)
treed0871082c4bd11b84de2a34cff3e6aee0168d1a2
parentea3c00fdcc43148414d8427b4505ba9f395c789e (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>
-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 34b5d60b477a..b55f59091492 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -954,6 +954,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
exit:
+ kfree(get_version_reply);
return retval;
error: