aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/common/eal_common_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_eal/common/eal_common_pci.c')
-rw-r--r--lib/librte_eal/common/eal_common_pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 7248c38b..096c65e4 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -344,7 +344,7 @@ rte_eal_pci_probe_one(const struct rte_pci_addr *addr)
continue;
ret = pci_probe_all_drivers(dev);
- if (ret < 0)
+ if (ret)
goto err_return;
return 0;
}
@@ -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;