]> git.droids-corp.org - dpdk.git/commitdiff
pci: fix memory leak when detaching device
authorYangchao Zhou <zhouyates@gmail.com>
Thu, 29 Sep 2016 01:41:10 +0000 (09:41 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 4 Oct 2016 08:05:51 +0000 (10:05 +0200)
Fixes: dbe6b4b61b0e ("pci: probe or close device")
Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: David Marchand <david.marchand@6wind.com>
lib/librte_eal/common/eal_common_pci.c

index 609c424ceeaca41aa480a931511d7d5913c2c7c9..638cd86e4852894a3d3de5a1d5b7e076ccdd82e4 100644 (file)
@@ -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;