aboutsummaryrefslogtreecommitdiffstats
path: root/lib/flex_array.c
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2009-07-31 06:32:03 +0000
committerTakashi Iwai <[email protected]>2009-07-31 08:14:58 +0000
commitf065fabc864f4c98857bf67caa2365e9f8545751 (patch)
tree5b5620ab40935a9e4dfc16a68f9b6e6e64c6d087 /lib/flex_array.c
parentALSA: ca0106 - Fix the max capture buffer size (diff)
downloadkernel-f065fabc864f4c98857bf67caa2365e9f8545751.tar.gz
kernel-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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/flex_array.c')
0 files changed, 0 insertions, 0 deletions