From: Julia Lawall <julia@diku.dk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
kernel-janitors@vger.kernel.org,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/usb/gadget/inode.c: add missing kfree
Date: Thu, 2 Jun 2011 16:56:35 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.1106021656060.430@ask.diku.dk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106021035500.1913-100000@iolanthe.rowland.org>
On Thu, 2 Jun 2011, Alan Stern wrote:
> On Thu, 2 Jun 2011, Julia Lawall wrote:
>
> > From: Julia Lawall <julia@diku.dk>
> >
> > The label fail frees dev->buf, but kbuf hasn't yet been stored there at
> > this point.
>
> ...
>
> > Signed-off-by: Julia Lawall <julia@diku.dk>
> >
> > ---
> > I wonder if it is really correct to free dev->buf at fail in this case.
> > Because it is freeing the previously allocated value of dev->buf, not the
> > current one as done in subsequent cases.
>
> I don't think it matters. This check is probably there only for
> safety; it should not be possible for dev->buf to be non-NULL at this
> point. You ought to be able to remove the entire
>
> if (dev->buf)
> goto fail;
>
> statement with no ill effects.
I can send such a patch if you think it is OK. But I have no way to test
it.
julia
next prev parent reply other threads:[~2011-06-02 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 8:26 Julia Lawall
2011-06-02 14:53 ` Alan Stern
2011-06-02 14:56 ` Julia Lawall [this message]
2011-06-02 15:17 ` Alan Stern
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=Pine.LNX.4.64.1106021656060.430@ask.diku.dk \
--to=julia@diku.dk \
--cc=dbrownell@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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®