diff options
author | Julia Lawall <[email protected]> | 2009-11-30 15:38:19 -0500 |
---|---|---|
committer | Matt Turner <[email protected]> | 2009-11-30 15:38:19 -0500 |
commit | cc9a2c8301683f73b7e0d1fc2cb5159110f3469f (patch) | |
tree | d513b100f178a0a4bf804e002d89af98f9f689c8 /tools/perf/scripts/python/syscall-counts.py | |
parent | 04d8a9db89f00dee78d792d094dc573784ead643 (diff) |
arch/alpha/kernel: Add kmalloc NULL tests
Check that the result of kmalloc is not NULL before passing it to other
functions.
The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
expression *x;
identifier f;
constant char *C;
@@
x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
when != x != NULL
when != (x || ...)
(
kfree(x)
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x->f
)
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Richard Henderson <[email protected]>
Signed-off-by: Matt Turner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions