From: Julia Lawall Date: Thu, 27 May 2010 12:33:17 +0000 (+0200) Subject: drivers/dma: Eliminate a NULL pointer dereference X-Git-Tag: v2.6.36-rc1~311^2~9^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=485680050166dc8c6ac976346430ab1f453c228b;p=pandora-kernel.git drivers/dma: Eliminate a NULL pointer dereference If td_desc is NULL, just skip both kfrees. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // Signed-off-by: Julia Lawall Signed-off-by: Dan Williams --- Reading git-diff-tree failed