From 972fdea2e6ece7578915d386a5447bc78d3fb8b8 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 29 Apr 2013 16:18:12 -0700 Subject: [PATCH] checkpatch: add check for reuse of krealloc arg MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On Thu, 2013-03-14 at 13:30 +0000, 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 Tested-by: Guenter Roeck Acked-by: Guenter Roeck Cc: David Woodhouse Cc: Andy Whitcroft Cc: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed