Skip to content

Commit

Permalink
usb: misc: legousbtower: Fix memory leak
Browse files Browse the repository at this point in the history
commit 0bd193d upstream.

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 25, 2017
1 parent ea3c00f commit 5d5ea13
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 @@ -954,6 +954,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device


exit:
kfree(get_version_reply);
return retval;

error:
Expand Down

0 comments on commit 5d5ea13

Please sign in to comment.