Commit d8bdd99e authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] fm801_gp_probe: fix use after free

The patch below by "Petri T. Koistinen" <petri.koistinen@iki.fi> in
Rusty's trivial patches is IMHO a candidate for 2.6.10 .
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 77482014
......@@ -98,8 +98,8 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment