diff options
author | Maksim Salau <maksim.salau@gmail.com> | 2017-05-13 20:49:26 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-25 13:44:29 (GMT) |
commit | 7d96e4a404c1eec5a4f941d2af572a252028b462 (patch) | |
tree | 0b3479006dc991234c0b43c1c5d2e62a8a452ff4 /drivers/usb | |
parent | 810b7c5599540d4f17c4fbda2a5c03b5e0e39a11 (diff) | |
download | linux-7d96e4a404c1eec5a4f941d2af572a252028b462.tar.xz |
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>
Diffstat (limited to 'drivers/usb')
-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 9dd202b..c2e2b2e 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c @@ -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: |