Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1648466 > unrolled thread

[PATCH 4.9 002/164] usb: misc: legousbtower: Fix memory leak

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-05-23 22:30 +0200
Last post2017-05-23 22:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.9 002/164] usb: misc: legousbtower: Fix memory leak Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-23 22:30 +0200

#1648466 — [PATCH 4.9 002/164] usb: misc: legousbtower: Fix memory leak

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-23 22:30 +0200
Subject[PATCH 4.9 002/164] usb: misc: legousbtower: Fix memory leak
Message-ID<tKoBk-8ko-27@gated-at.bofh.it>
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Maksim Salau <maksim.salau@gmail.com>

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>

---
 drivers/usb/misc/legousbtower.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -941,6 +941,7 @@ static int tower_probe (struct usb_inter
 		 USB_MAJOR, dev->minor);
 
 exit:
+	kfree(get_version_reply);
 	return retval;
 
 error:

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web