Tag: cf05b824dbb871159e1b4c4f2733b9c9d2f756cf

[S390] drivers/s390: put NULL test before dereference

Author: Julia Lawall <julia@diku.dk> If the NULL test on block is needed, it should be before the dereference of the base field. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ expression E1,E2; identifier fld; statement S1,S2; @@ E1 = E2->fld; ( if (E1 == NULL) S1 else S2 | *if …

Continue reading