linux/sound/aoa
Julia Lawall f065fabc86 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>
2009-07-31 10:14:58 +02:00
..
codecs
core ALSA: sound/aoa: Add kmalloc NULL tests 2009-07-31 10:14:58 +02:00
fabrics sound: remove driver_data direct access of struct device 2009-05-12 09:20:54 +02:00
soundbus sound: remove driver_data direct access of struct device 2009-05-12 09:20:54 +02:00
Kconfig
Makefile
aoa-gpio.h
aoa.h