Re: [PATCH] checkpatch: Add check for reuse of krealloc arg

2013-03-14 Thread Guenter Roeck
On Thu, Mar 14, 2013 at 09:18:05AM -0700, Joe Perches wrote: > On Thu, 2013-03-14 at 13:30 +, David Woodhouse wrote: > > If krealloc() returns NULL, it *doesn't* free the original. So any code > > of the form 'foo = krealloc(foo, …);' is almost certainly a bug. > > So add a check for it to che

[PATCH] checkpatch: Add check for reuse of krealloc arg

2013-03-14 Thread Joe Perches
On Thu, 2013-03-14 at 13:30 +, David Woodhouse wrote: > If krealloc() returns NULL, it *doesn't* free the original. So any code > of the form 'foo = krealloc(foo, …);' is almost certainly a bug. So add a check for it to checkpatch. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 7 ++