summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-09-23 01:47:39 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 16:39:56 +0200
commitff8147fe71246b81a48de5f37041b026b57d60ca (patch)
tree9ae6fb50b937d1b38a7d53a925d5fb9759db1cd4 /drivers/video/fbmem.c
parentdrivers/video/console/newport_con.c: fix read outside array bounds (diff)
downloadlinux-ff8147fe71246b81a48de5f37041b026b57d60ca.tar.xz
linux-ff8147fe71246b81a48de5f37041b026b57d60ca.zip
drivers/video: 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> [akpm@linux-foundation.org: convert to kstrdup() as well] Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions