1 Aug 2010 19:23
[PATCH] drivers/scsi/pm8001: introduce missing kfree
Julia Lawall <julia <at> diku.dk>
2010-08-01 17:23:35 GMT
2010-08-01 17:23:35 GMT
From: Julia Lawall <julia <at> diku.dk> Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> <at> r exists <at> local idexpression x; expression E; identifier f,f1; position p1,p2; <at> <at> x <at> p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); <... when != x when != if (...) { <+...x...+> } when != (x) == NULL when != (x) != NULL when != (x) == 0 when != (x) != 0 ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...>(Continue reading)
RSS Feed