From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 8B1BB1025 for ; Mon, 28 Apr 2014 15:19:53 +0200 (CEST) Received: by mail-wg0-f50.google.com with SMTP id k14so1842344wgh.21 for ; Mon, 28 Apr 2014 06:19:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=+8S6YBcIKsguzBdp4a41L7GW79PC284voqEJ0r3mkTo=; b=iM7u1OyzV3h9oCppbyoGHtpZGhphrrwxeybnkuOYSW1vqtmL9cEuc4uByR23eikmme YkCJfBQxsXrliH7TD/ZOoCYw1PKAXj3L0p7e19XzaB60xJ0KrRmdtx55/894TQdgqVlU JxbdFa5bMR+in7VSrqOYotW1a1QF5MdWezVw2AsJSIl9IJ+EeMNlUxNbLaZ0j5B1T9Gs nQa/oA4yi44EKWzGvjDSh3sPv6gbHZACJJvEEBT3IkOg9F6cxj0AXrMJ0Y+wClmlcC86 HNI2MWbzORAfXIRx475V2Y+t1YTRlmkvypeh1Gzr6q16ygYSl9B/4N1hJ/LhDcaFBdAb ZvZA== X-Gm-Message-State: ALoCoQlSv1K7+sAa5B9VLlWXDLs/n84yMhO9lb0ZrHfgyKLJgNnwVP5goy2jX/HMwbc4jPve15ig X-Received: by 10.180.96.39 with SMTP id dp7mr15584097wib.12.1398691196953; Mon, 28 Apr 2014 06:19:56 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ej7sm17746555wib.9.2014.04.28.06.19.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Apr 2014 06:19:56 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 28 Apr 2014 15:19:41 +0200 Message-Id: <1398691187-4918-2-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1398691187-4918-1-git-send-email-david.marchand@6wind.com> References: <1398691187-4918-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 1/7] pci: fix potential mem leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 13:19:53 -0000 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