[dpdk-dev] [PATCH 1/7] pci: fix potential mem leak
David Marchand
david.marchand at 6wind.com
Mon Apr 28 15:19:41 CEST 2014
Looking at bsd implementation, we can see that there is a potential mem leak in
linux implementation. Fix this.
Signed-off-by: David Marchand <david.marchand at 6wind.com>
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 9538efe..313bab7 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -678,6 +678,7 @@ pci_uio_map_resource(struct rte_pci_device *dev)
(mapaddr = pci_map_resource(dev,
NULL, devname, (off_t)offset,
(size_t)maps[j].size)) == NULL) {
+ rte_free(uio_res);
return (-1);
}
--
1.7.10.4
More information about the dev
mailing list