[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2186395.ZOncrV6nFS@daeseok-laptop.cloud.net>
Date: Mon, 31 Mar 2014 19:08:06 +0900
From: Daeseok Youn <daeseok.youn@...il.com>
To: konrad.wilk@...cle.com
Cc: boris.ostrovsky@...cle.com, david.vrabel@...rix.com,
joe@...ches.com, xen-devel@...ts.xenproject.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] xen: fix memory leak in __xen_pcibk_add_pci_dev()
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists