mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daeseok Youn <daeseok.youn@gmail.com>
To: gregkh@linuxfoundation.org
Cc: d@teklibre.com, paul.gortmaker@windriver.com,
	sara.bird.iar@gmail.com, dan.carpenter@oracle.com,
	standby24x7@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] staging: frontier: fix memory leak in usb_alphatrack_probe()
Date: Fri, 07 Mar 2014 17:02:25 +0900	[thread overview]
Message-ID: <2118769.zIlmIgrC0S@daeseok-laptop.cloud.net> (raw)


oldi_buffer and write_buffer need to free when usb_alphatrack_delete()
is called.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/frontier/alphatrack.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c
index edd5cef..4d630da 100644
--- a/drivers/staging/frontier/alphatrack.c
+++ b/drivers/staging/frontier/alphatrack.c
@@ -208,6 +208,8 @@ static void usb_alphatrack_delete(struct usb_alphatrack *dev)
 	kfree(dev->ring_buffer);
 	kfree(dev->interrupt_in_buffer);
 	kfree(dev->interrupt_out_buffer);
+	kfree(dev->oldi_buffer);
+	kfree(dev->write_buffer);
 	kfree(dev);		/* fixme oldi_buffer */
 }
 
-- 
1.7.4.4



             reply	other threads:[~2014-03-07  8:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  8:02 Daeseok Youn [this message]
2014-03-07  8:14 ` Dan Carpenter
2014-03-07  8:20   ` DaeSeok Youn

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=2118769.zIlmIgrC0S@daeseok-laptop.cloud.net \
    --to=daeseok.youn@gmail.com \
    --cc=d@teklibre.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=sara.bird.iar@gmail.com \
    --cc=standby24x7@gmail.com \
    /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®