From: Julia Lawall Date: Fri, 28 Oct 2011 23:58:13 +0000 (+0200) Subject: drivers/staging/rtl8712/rtl871x_mlme.c: eliminate a null pointer dereference X-Git-Tag: v3.3-rc1~152^2~101^2~283 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c19c1e80d348a5c79b65f9fc3d54bbbeea9cd0f;p=pandora-kernel.git drivers/staging/rtl8712/rtl871x_mlme.c: eliminate a null pointer dereference If ibss_wlan is NULL, it is not correct to memcpy into its field. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ expression E, E1; identifier f; statement S1,S2,S3; @@ if (E == NULL) { ... when != if (E == NULL || ...) S1 else S2 when != E = E1 *E->f ... when any return ...; } else S3 // Signed-off-by: Julia Lawall Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed