[dpdk-dev] pci:fix missing free

Message ID 1474596409-3501-1-git-send-email-zhouyates@gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Matt Sept. 23, 2016, 2:06 a.m. UTC
  Signed-off-by: zhouyangchao <zhouyates@gmail.com>
---
 lib/librte_eal/common/eal_common_pci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
  

Comments

Thomas Monjalon Sept. 23, 2016, 8:46 a.m. UTC | #1
Hi,

2016-09-23 10:06, zhouyangchao:
> Signed-off-by: zhouyangchao <zhouyates@gmail.com>

Is your first name Yangchao and your surname Zhou?
If so, it would be:
	Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
  

Patch

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 7248c38..eb44998 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -378,6 +378,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;