From: Julia Lawall Date: Tue, 24 Aug 2010 04:38:33 +0000 (+0000) Subject: drivers/net/irda: Eliminate memory leak X-Git-Tag: v2.6.37-rc1~147^2~667 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d34e7d6f38fce1c7e595404295494cd1eaba3eb;p=pandora-kernel.git drivers/net/irda: Eliminate memory leak dev_alloc_skb allocates some memory, so that memory should be freed before leaving the function in an error case. Corrected some typos in a nearby comment as well. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E; identifier f1; iterator I; @@ x = dev_alloc_skb(...); <... when != x when != true (x == NULL || ...) when != if (...) { <+...x...+> } when != I (...) { <+...x...+> } ( x == NULL | x == E | x->f1 ) ...> * return ...; // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- Reading git-diff-tree failed