* [PATCH] possible memory leak fix
@ 2004-02-18 7:43 MAEDA Naoaki
2004-02-18 19:16 ` David Mosberger
0 siblings, 1 reply; 2+ messages in thread
From: MAEDA Naoaki @ 2004-02-18 7:43 UTC (permalink / raw)
To: linux-ia64
Hi,
I found a possible memory leak problem in alloc_resource().
The following patch against 2.6.3 fix the problem.
Regards,
- Naoaki Maeda
diff -Naur linux-2.6.3.org/arch/ia64/pci/pci.c linux-2.6.3/arch/ia64/pci/pci.c
--- linux-2.6.3.org/arch/ia64/pci/pci.c 2004-02-18 12:57:46.000000000 +0900
+++ linux-2.6.3/arch/ia64/pci/pci.c 2004-02-18 16:36:13.736205500 +0900
@@ -153,8 +153,10 @@
res->end = end;
res->flags = flags;
- if (insert_resource(root, res))
+ if (insert_resource(root, res)) {
+ kfree(res);
return -EBUSY;
+ }
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-18 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-18 7:43 [PATCH] possible memory leak fix MAEDA Naoaki
2004-02-18 19:16 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox