From: Daeseok Youn <daeseok.youn@gmail.com>
To: konrad.wilk@oracle.com
Cc: boris.ostrovsky@oracle.com, david.vrabel@citrix.com,
joe@perches.com, xen-devel@lists.xenproject.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] xen: fix memory leak in __xen_pcibk_add_pci_dev()
Date: Mon, 31 Mar 2014 19:08:06 +0900 [thread overview]
Message-ID: <2186395.ZOncrV6nFS@daeseok-laptop.cloud.net> (raw)
It need to free dev_entry when it failed to assign to a new
slot on the virtual PCI bus.
smatch says:
drivers/xen/xen-pciback/vpci.c:142 __xen_pcibk_add_pci_dev() warn:
possible memory leak of 'dev_entry'
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/xen/xen-pciback/vpci.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/xen/xen-pciback/vpci.c b/drivers/xen/xen-pciback/vpci.c
index 3165ce3..657e50f 100644
--- a/drivers/xen/xen-pciback/vpci.c
+++ b/drivers/xen/xen-pciback/vpci.c
@@ -130,6 +130,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev,
err = -ENOMEM;
xenbus_dev_fatal(pdev->xdev, err,
"No more space on root virtual PCI bus");
+ kfree(dev_entry);
unlock:
mutex_unlock(&vpci_dev->lock);
--
1.7.4.4
next reply other threads:[~2014-03-31 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 10:08 Daeseok Youn [this message]
2014-04-01 7:23 ` [Xen-devel] " Jan Beulich
2014-04-01 8:17 ` DaeSeok Youn
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=2186395.ZOncrV6nFS@daeseok-laptop.cloud.net \
--to=daeseok.youn@gmail.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=joe@perches.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.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
all inboxes | Powered by JetHome®