All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] fm801_gp_probe: fix use after free
@ 2004-12-12 19:45 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2004-12-12 19:45 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds
  Cc: Petri T. Koistinen, linux-kernel, vojtech, linux-input

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: Adrian Bunk <bunk@stusta.de>

--- 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;
 	}
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-12-12 19:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-12 19:45 [2.6 patch] fm801_gp_probe: fix use after free Adrian Bunk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.