From: Maksim Salau Date: Sat, 13 May 2017 20:49:26 +0000 (+0300) Subject: usb: misc: legousbtower: Fix memory leak X-Git-Tag: MMI-PSA29.97-13-9~5558^2~27 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0bd193d62b4270a2a7a09da43ad1034c7ca5b3d3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Maksim Salau Signed-off-by: Greg Kroah-Hartman --- 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: