diff options
author | Maksim Salau <maksim.salau@gmail.com> | 2017-05-13 23:49:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-17 11:27:41 +0200 |
commit | 0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3 (patch) | |
tree | b0dbf8e4281c5ade54e073dc9d0042a209c0282d | |
parent | 2f964780c03b73de269b08d12aff96a9618d13f3 (diff) | |
download | linux-stable-0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3.tar.gz linux-stable-0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3.tar.bz2 linux-stable-0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3.zip |
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>
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 1 |
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: |