diff options
author | Julia Lawall <julia@diku.dk> | 2009-07-31 08:32:03 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-31 10:14:58 +0200 |
commit | f065fabc864f4c98857bf67caa2365e9f8545751 (patch) | |
tree | 5b5620ab40935a9e4dfc16a68f9b6e6e64c6d087 /sound/aoa/codecs | |
parent | 34fdeb2d07102e07ecafe79dec170bd6733f2e56 (diff) | |
download | linux-f065fabc864f4c98857bf67caa2365e9f8545751.tar.gz linux-f065fabc864f4c98857bf67caa2365e9f8545751.tar.bz2 linux-f065fabc864f4c98857bf67caa2365e9f8545751.zip |
ALSA: sound/aoa: Add kmalloc NULL tests
Check that the result of kzalloc is not NULL before a dereference.
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 <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/aoa/codecs')
0 files changed, 0 insertions, 0 deletions