From: Yangchao Zhou Date: Thu, 29 Sep 2016 01:41:10 +0000 (+0800) Subject: pci: fix memory leak when detaching device X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6edfa69ba6fe86e9f59c76d0bb3732c558aeedc9;p=dpdk.git pci: fix memory leak when detaching device Fixes: dbe6b4b61b0e ("pci: probe or close device") Signed-off-by: Yangchao Zhou Acked-by: David Marchand --- 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;