From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C22831B600 for ; Tue, 7 Nov 2017 09:54:23 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2017 00:54:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,357,1505804400"; d="scan'208";a="918425315" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.255.231.67]) ([10.255.231.67]) by FMSMGA003.fm.intel.com with ESMTP; 07 Nov 2017 00:53:08 -0800 From: Ferruh Yigit To: Stefan Baranoff Cc: dev@dpdk.org References: <20171105172445.9401-1-sbaranoff@gmail.com> Message-ID: <0847abc0-1629-87f8-4afd-db22c010aaeb@intel.com> Date: Tue, 7 Nov 2017 00:53:06 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/pcap: fix memory leak from missing pcap_close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2017 08:54:24 -0000 On 11/6/2017 11:52 AM, Ferruh Yigit wrote: > On 11/5/2017 9:24 AM, Stefan Baranoff wrote: >> In open_single_tx_pcap there is a call to pcap_open_dead which calls >> malloc to create and return a pcap_t. That object is never freed in >> this case. Other places it is freed by passing it back similar to the >> way the pcap_dumper_t is in this case. >> >> The pcap_t is only used to create the pcap_dumper_t and is never used >> again so freeing it here is safe and much simpler than trying to pass >> it back to be freed in eth_dev_stop along with the other >> pcap_t/pcap_dumper_t objects. >> >> Signed-off-by: Stefan Baranoff > > net/pcap: fix memory leak in dumper open > > Fixes: 4c173302c307 ("pcap: add new driver") > Cc: stable@dpdk.org > > Acked-by: Ferruh Yigit Applied to dpdk-next-net/master, thanks.