android_kernel_xiaomi_sm8350/net/netlabel
Julia Lawall ca7daea612 net/netlabel: Add kmalloc NULL tests
The test on map4 should be a test on map6.

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>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-30 10:58:28 -07:00
..
Kconfig
Makefile
netlabel_addrlist.c netlabel: Always remove the correct address selector 2009-04-22 00:46:09 -07:00
netlabel_addrlist.h
netlabel_cipso_v4.c netlabel: Use genl_register_family_with_ops() 2009-05-21 16:50:24 -07:00
netlabel_cipso_v4.h
netlabel_domainhash.c netlabel: Update kernel configuration API 2008-12-31 12:54:11 -05:00
netlabel_domainhash.h netlabel: Update kernel configuration API 2008-12-31 12:54:11 -05:00
netlabel_kapi.c net/netlabel: Add kmalloc NULL tests 2009-07-30 10:58:28 -07:00
netlabel_mgmt.c netlabel: Use genl_register_family_with_ops() 2009-05-21 16:50:24 -07:00
netlabel_mgmt.h
netlabel_unlabeled.c netlabel: Use genl_register_family_with_ops() 2009-05-21 16:50:24 -07:00
netlabel_unlabeled.h netlabel: Update kernel configuration API 2008-12-31 12:54:11 -05:00
netlabel_user.c
netlabel_user.h