From: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>
To: linux-kernel@vger.kernel.org
Cc: "Bjørn Mork" <bjorn@mork.no>,
"Len Sorensen" <lsorense@csclub.uwaterloo.ca>,
linux@sierrawireless.com
Subject: Fix memory leak in sierra_release()
Date: Tue, 23 Oct 2012 16:03:33 -0400 [thread overview]
Message-ID: <20121023200333.GN18610@csclub.uwaterloo.ca> (raw)
I found a memory leak in sierra_release() (well sierra_probe() I guess)
that looses 8 bytes each time the driver releases a device.
Here is the patch to fix it.
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 01d882c..76ef95b 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -959,6 +959,7 @@ static void sierra_release(struct usb_serial *serial)
continue;
kfree(portdata);
}
+ kfree(serial->private);
}
#ifdef CONFIG_PM
--
Len Sorensen
next reply other threads:[~2012-10-23 20:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 20:03 Lennart Sorensen [this message]
2012-10-24 11:00 ` Bjørn Mork
2012-10-24 14:15 ` Lennart Sorensen
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=20121023200333.GN18610@csclub.uwaterloo.ca \
--to=lsorense@csclub.uwaterloo.ca \
--cc=bjorn@mork.no \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@sierrawireless.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®