[2.6 patch] fm801_gp_probe: fix use after free

From: Adrian Bunk
Date: Sun Dec 12 2004 - 14:49:12 EST


The patch below by "Petri T. Koistinen" <petri.koistinen@xxxxxx> in
Rusty's trivial patches is IMHO a candidate for 2.6.10 .


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

--- linux-2.6.10-rc3/drivers/input/gameport/fm801-gp.c 2004-10-19 14:34:00.000000000 +1000
+++ .27568.trivial/drivers/input/gameport/fm801-gp.c 2004-12-05 11:06:01.000000000 +1100
@@ -98,8 +98,8 @@ static int __devinit fm801_gp_probe(stru
pci_enable_device(pci);
gp->gameport.io = pci_resource_start(pci, 0);
if ((gp->res_port = request_region(gp->gameport.io, 0x10, "FM801 GP")) == NULL) {
- kfree(gp);
printk("unable to grab region 0x%x-0x%x\n", gp->gameport.io, gp->gameport.io + 0x0f);
+ kfree(gp);
return -1;
}


-
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/