Re: [PATCH 1/1] usbip/userspace/libsrc/names.c: memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx wrote:
> > > From: Heinrich Schuchardt <xypron.glpk@xxxxxx>
> > > 
> > > 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?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux