[2.6 patch] drivers/telephony/ixj: fix a use after free

From: Adrian Bunk
Date: Wed Mar 23 2005 - 20:18:07 EST


This patch fixes a use after free found by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

--- linux-2.6.12-rc1-mm1-full/drivers/telephony/ixj.c.old 2005-03-23 03:40:55.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/drivers/telephony/ixj.c 2005-03-23 03:41:21.000000000 +0100
@@ -5946,10 +5946,10 @@ static int ixj_build_filter_cadence(IXJ
j->cadence_f[lcp->filter].off3 = lcp->off3;
j->cadence_f[lcp->filter].off3min = 0;
j->cadence_f[lcp->filter].off3max = 0;
- kfree(lcp);
if(ixjdebug & 0x0002) {
printk(KERN_INFO "Cadence %d loaded\n", lcp->filter);
}
+ kfree(lcp);
return 0;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/