mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: linux-kernel@vger.kernel.org, linux@sierrawireless.com
Subject: Re: Fix memory leak in sierra_release()
Date: Wed, 24 Oct 2012 10:15:06 -0400	[thread overview]
Message-ID: <20121024141506.GP18610@csclub.uwaterloo.ca> (raw)
In-Reply-To: <87r4oof83e.fsf@nemi.mork.no>

On Wed, Oct 24, 2012 at 01:00:21PM +0200, Bjørn Mork wrote:
> "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.

Oh yeah.  I shouldn't send patches at the end of the day.

I will try again.

-- 
Len Sorensen

      reply	other threads:[~2012-10-24 14:15 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
2012-10-24 14:15   ` Lennart Sorensen [this message]

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=20121024141506.GP18610@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

Powered by JetHome