From: "Bjørn Mork" <bjorn@mork.no>
To: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>
Cc: linux-kernel@vger.kernel.org, linux@sierrawireless.com
Subject: Re: Fix memory leak in sierra_release()
Date: Wed, 24 Oct 2012 13:00:21 +0200 [thread overview]
Message-ID: <87r4oof83e.fsf@nemi.mork.no> (raw)
In-Reply-To: <20121023200333.GN18610@csclub.uwaterloo.ca> (Lennart Sorensen's message of "Tue, 23 Oct 2012 16:03:33 -0400")
"Lennart Sorensen" <lsorense@csclub.uwaterloo.ca> writes:
> 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
Looks sensible to me, but needs a signed-off-by and CC to linux-usb.
Bjørn
next prev parent reply other threads:[~2012-10-24 11:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 20:03 Lennart Sorensen
2012-10-24 11:00 ` Bjørn Mork [this message]
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=87r4oof83e.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@sierrawireless.com \
--cc=lsorense@csclub.uwaterloo.ca \
/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
Powered by JetHome