From: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] possible memory leak fix
Date: Wed, 18 Feb 2004 07:43:27 +0000 [thread overview]
Message-ID: <20040218.164327.74757142.maeda@jp.fujitsu.com> (raw)
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;
}
next reply other threads:[~2004-02-18 7:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-18 7:43 MAEDA Naoaki [this message]
2004-02-18 19:16 ` [PATCH] possible memory leak fix David Mosberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040218.164327.74757142.maeda@jp.fujitsu.com \
--to=maeda.naoaki@jp.fujitsu.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox