From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: [PATCH 1/7] pci: fix potential mem leak Date: Mon, 28 Apr 2014 15:19:41 +0200 Message-ID: <1398691187-4918-2-git-send-email-david.marchand@6wind.com> References: <1398691187-4918-1-git-send-email-david.marchand@6wind.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1398691187-4918-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Looking at bsd implementation, we can see that there is a potential mem leak in linux implementation. Fix this. Signed-off-by: David Marchand --- 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