From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Julia Lawall <julia@diku.dk>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] Eliminate double kfree
Date: Thu, 29 May 2008 12:14:23 -0400 [thread overview]
Message-ID: <20080529121315.ZZRA012@mailhub.coreip.homeip.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0805291754480.26229@ask.diku.dk>
On Thu, May 29, 2008 at 05:57:50PM +0200, Julia Lawall wrote:
> On Thu, 29 May 2008, Dmitry Torokhov wrote:
>
> > Hi Julia,
> >
> > On Thu, May 29, 2008 at 03:05:07PM +0200, Julia Lawall wrote:
> > > From: Julia Lawall <julia@diku.dk>
> > >
> > > The variable report is only non-NULL and non-freed in a small region of
> > > code, so it should only be freed in error handling code that comes from
> > > that region.
> > >
> >
> > Thank you for your patch. There isn't a double-kfree though, as far
> > as I can see.
>
> There was a double free because the error handling at the end of the
> function (for input_register_device) would fall through to the
> kfree(report) under err_free_devs, even though report is already freed at
> that point.
>
Ah, yes, indeed.. Well, that decides what branch the patch gets
applied then ;)
--
Dmitry
prev parent reply other threads:[~2008-05-29 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 13:05 [PATCH 2/2] Eliminate double kfree Julia Lawall
2008-05-29 15:33 ` Dmitry Torokhov
2008-05-29 15:57 ` Julia Lawall
2008-05-29 16:14 ` Dmitry Torokhov [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=20080529121315.ZZRA012@mailhub.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).