pci: fix memory leak when detaching device

Fixes: dbe6b4b61b ("pci: probe or close device")

Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: David Marchand <david.marchand@6wind.com>
This commit is contained in:
Yangchao Zhou 2016-09-29 09:41:10 +08:00 committed by Thomas Monjalon
parent 13a1317d3b
commit 6edfa69ba6

View 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;