usb: misc: legousbtower: Fix memory leak
Subsystems (2)
PATCH 1/1 usb: misc: legousbtower: Fix memory leak
get_version_reply is not freed if function returns with success. Memory leak was introduced by commit 942a48730faf149ccbf3e12ac718aee120bb3529
--- drivers/usb/misc/legousbtower.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/misc/legousbtower.c +1 -0
@@ -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:
Signature · 1 line
2.9.3
Hi,
Quoted 2 lines · Maksim Salau
get_version_replyis not freed if function returns with success. Memory leak was introduced by commit942a48730faf149ccbf3e12ac718aee120bb3529
Pointing the commit like that is probable fine, but you should also use "Fixes" tag:
Please check Documentation/process/submitting-patches.rst for more information.
Quoted 1 line
Signed-off-by Heikki Krogerus <[email protected]>
You are signing the patch for me which you should not be doing in this case. More appropriate tag would be for example "Suggested-by" or something like that. There is more information about this too in Documentation/process/submitting-patches.rst
Quoted 19 lines
Signed-off-by Maksim Salau <[email protected]>--- drivers/usb/misc/legousbtower.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/misc/legousbtower.c +1
-0@@ -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:Signature · 1 line
2.9.3
Thanks,
Signature · 1 line
heikki