* [dpdk-dev] [PATCH] pci: fix resource leak when detach pci device
@ 2016-08-06 10:52 周杨超
0 siblings, 0 replies; only message in thread
From: 周杨超 @ 2016-08-06 10:52 UTC (permalink / raw)
To: dev; +Cc: david.marchand
>From be6a6cc831d2b9e26c53ec6014138c3e3d5bffc1 Mon Sep 17 00:00:00 2001
From: zhouyangchao <zhouyates@gmail.com>
Date: Sat, 6 Aug 2016 17:45:51 +0800
Subject: [PATCH] pci: fix resource leak when detach pci device
Signed-off-by: zhouyangchao <zhouyates@gmail.com>
---
lib/librte_eal/common/eal_common_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/common/eal_common_pci.c
b/lib/librte_eal/common/eal_common_pci.c
index 40f4922..ef6b1c3 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -362,6 +362,7 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr)
goto err_return;
TAILQ_REMOVE(&pci_device_list, dev, next);
+ free(dev);
return 0;
}
return -1;
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-06 10:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-06 10:52 [dpdk-dev] [PATCH] pci: fix resource leak when detach pci device 周杨超
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).