From: Dan Carpenter <dan.carpenter@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, xypron.glpk@gmx.de,
linux-usb@vger.kernel.org, ly80toro@cip.cs.fau.de,
linux-kernel@vger.kernel.org, ke42caxa@cip.cs.fau.de,
Fengguang Wu <wfg@linux.intel.com>
Subject: Re: [PATCH 1/1] usbip/userspace/libsrc/names.c: memory leak
Date: Tue, 28 Jan 2014 03:04:09 +0300 [thread overview]
Message-ID: <20140128000409.GB5364@mwanda> (raw)
In-Reply-To: <20140127232736.GA652@kroah.com>
On Mon, Jan 27, 2014 at 03:27:36PM -0800, Greg KH wrote:
> On Tue, Jan 28, 2014 at 02:02:12AM +0300, Dan Carpenter wrote:
> > On Mon, Jan 27, 2014 at 02:50:04PM -0800, Greg KH wrote:
> > > On Mon, Jan 27, 2014 at 11:29:48PM +0100, xypron.glpk@gmx.de wrote:
> > > > From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > >
> > > > p is freed if NULL.
> > >
> > > Not a real problem, right?
> > >
> > > > p is leaked if second calloc fails.
> > >
> > > You just created a new bug in your "fix" :(
> > >
> > > Please run your patches through scripts/checkpatch.pl, odds are, it
> > > would have caught this error.
> > >
> >
> > Checkpatch doesn't catch the problems here. I thought it would have
> > caught the style issue but apparently it only looks for extra curly
> > braces when you run it in --file mode.
>
> Ah, that's good to know.
>
> > Fengguang would hopefully have caught the missing curly braces bug with
> > Coccinelle.
>
> Is Coccinelle run on the userspace .c code in the kernel?
Hm... I'm not sure. Fengguang, do you know if we would have caught
the missing curly braces in this patch?
http://lkml.org/lkml/2014/1/27/460
regards,
dan carpenter
next prev parent reply other threads:[~2014-01-28 0:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 22:29 [PATCH 1/1] usbip/userspace/libsrc/names.c: memory leak xypron.glpk
2014-01-27 22:50 ` Greg KH
2014-01-27 23:02 ` Dan Carpenter
2014-01-27 23:27 ` Greg KH
2014-01-28 0:04 ` Dan Carpenter [this message]
2014-01-27 22:52 ` Dan Carpenter
2014-01-28 20:16 ` xypron.glpk
2014-01-27 23:52 ` Sergei Shtylyov
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=20140128000409.GB5364@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=ke42caxa@cip.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ly80toro@cip.cs.fau.de \
--cc=wfg@linux.intel.com \
--cc=xypron.glpk@gmx.de \
/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