>From: Julia Lawall [mailto:julia@diku.dk]
>Sent: Thursday, May 29, 2008 6:05 AM
>To: jbarnes@virtuousgeek.org; linux-pci@vger.kernel.org; linux-
>kernel@vger.kernel.org;
kernel-janitors@vger.kernel.org
>Subject: [PATCH 1/2] Eliminate double kfree
>
>From: Julia Lawall <julia@diku.dk>
>
>The destination of goto error also does a kfree(g_iommus), so it is not
>correct to do one here.
>
>This was found using the following semantic match.
>(
http://www.emn.fr/x-info/coccinelle/)
>
>// <smpl>
>@r1@
>expression E;
>position p1,p2;
>@@
>
>kfree@p1(E);
>...
>kfree@p2(E);
>
>@subexps@
>expression E1;
>position r1.p1,p;
>@@
>
>kfree@p1(<+... E1@p ...+>);
>
>@recollect@
>position subexps.p;
>expression E1;
>@@
>
>E1@p
>
>@doublekfree@
>position r1.p1,r1.p2;
>expression recollect.E1,E2,E;
>position p;
>statement S;
>@@
>
>kfree@p1(E);
><+... E1@p=E2 ...+> // the actual semantic match contains other