From: Maksim Salau <maksim.salau@gmail.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Juergen Stuber <starblue@users.sourceforge.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
legousb-devel@lists.sourceforge.net, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
Alfredo Rafael Vicente Boix <alviboi@gmail.com>
Cc: Maksim Salau <maksim.salau@gmail.com>
Subject: [PATCH] usb: misc: legousbtower: Fix memory leak
Date: Thu, 4 May 2017 22:51:52 +0300 [thread overview]
Message-ID: <20170504195152.1862-1-maksim.salau@gmail.com> (raw)
get_version_reply is not freed if function returns with success.
Memory leak was introduced by commit 942a48730faf149ccbf3e12ac718aee120bb3529
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
---
drivers/usb/misc/legousbtower.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index aa3c280..0782ac6 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:
--
2.9.3
next reply other threads:[~2017-05-04 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 19:51 Maksim Salau [this message]
2017-05-05 7:32 ` Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170504195152.1862-1-maksim.salau@gmail.com \
--to=maksim.salau@gmail.com \
--cc=alviboi@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=legousb-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=starblue@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®