From 485680050166dc8c6ac976346430ab1f453c228b Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Thu, 27 May 2010 14:33:17 +0200 Subject: [PATCH] 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-format-patch failed