Skip to content

Commit

Permalink
usb: misc: legousbtower: Fix memory leak
Browse files Browse the repository at this point in the history
get_version_reply is not freed if function returns with success.

Fixes: 942a487 ("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>
  • Loading branch information
Maksim Salau authored and Greg Kroah-Hartman committed May 17, 2017
1 parent 2f96478 commit 0bd193d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/misc/legousbtower.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0bd193d

Please sign in to comment.