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

Greg KH gregkh at linuxfoundation.org
Mon Jan 27 22:50:04 UTC 2014


On Mon, Jan 27, 2014 at 11:29:48PM +0100, xypron.glpk at gmx.de wrote:
> From: Heinrich Schuchardt <xypron.glpk at 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.

greg k-h


More information about the devel mailing list