From 6edfa69ba6fe86e9f59c76d0bb3732c558aeedc9 Mon Sep 17 00:00:00 2001 From: Yangchao Zhou Date: Thu, 29 Sep 2016 09:41:10 +0800 Subject: [PATCH] pci: fix memory leak when detaching device Fixes: dbe6b4b61b0e ("pci: probe or close device") Signed-off-by: Yangchao Zhou Acked-by: David Marchand --- 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 609c424cee..638cd86e48 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -387,6 +387,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; -- 2.20.1