diff options
author | Joe Perches <joe@perches.com> | 2013-04-29 16:18:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:28:19 -0700 |
commit | 972fdea2e6ece7578915d386a5447bc78d3fb8b8 (patch) | |
tree | 22c3cf9b8c078efc8d272df333416faca460914a /net/ipv4/tcp_memcontrol.c | |
parent | 2e0fb404c86d6c86dc33e284310eb5d28d192dcf (diff) |
checkpatch: add check for reuse of krealloc arg
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 <joe@perches.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4/tcp_memcontrol.c')
0 files changed, 0 insertions, 0 deletions