From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02DD1A052B; Thu, 30 Jul 2020 04:57:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE80F1C00E; Thu, 30 Jul 2020 04:57:11 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 45A732BBD; Thu, 30 Jul 2020 04:57:09 +0200 (CEST) IronPort-SDR: EndI8Vf5ZTygg2LbOtNllTpg0nDYCS36LViBA5OAeoREfOwdG2qvTtWG34PfmaGlVtn5M2RJcY gUk5oB/smedw== X-IronPort-AV: E=McAfee;i="6000,8403,9697"; a="139064833" X-IronPort-AV: E=Sophos;i="5.75,412,1589266800"; d="scan'208";a="139064833" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 19:57:07 -0700 IronPort-SDR: cbjFifAgEBmlGjLML5Ipko45LkSWMYiRsRVSuSH1T9n6whrPY6/7++uyHT1lUAavdOK1f3f2rr 4jXuLIw1I4Xw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,412,1589266800"; d="scan'208";a="313258073" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.176]) ([10.67.68.176]) by fmsmga004.fm.intel.com with ESMTP; 29 Jul 2020 19:57:06 -0700 To: wangyunjian , "dev@dpdk.org" Cc: "Lilijun (Jerry)" , xudingke , "stable@dpdk.org" References: <34EFBCA9F01B0748BEB6B629CE643AE60D0F2D4B@dggemm513-mbx.china.huawei.com> From: Jeff Guo Message-ID: <285764ce-becf-8edf-cea1-3ac8fd1f1de8@intel.com> Date: Thu, 30 Jul 2020 10:57:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <34EFBCA9F01B0748BEB6B629CE643AE60D0F2D4B@dggemm513-mbx.china.huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing event_cb 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" hi, yunjian The patch seems no problem, but when you update your patch, please add other guys who had comment on your patch and maintainer to see if they have other opinion, and --in-reply-to is also helpful for patch review, thanks. On 7/29/2020 7:47 PM, wangyunjian wrote: > Ping for review. > > Thanks, > Yunjian > >> -----Original Message----- >> From: wangyunjian >> Sent: Friday, July 3, 2020 5:46 PM >> To: dev@dpdk.org >> Cc: jia.guo@intel.com; Lilijun (Jerry) ; xudingke >> ; wangyunjian ; >> stable@dpdk.org >> Subject: [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing >> event_cb >> >> From: Yunjian Wang >> >> The event_cb->dev_name is not freed when freeing event_cb, and this causes a >> memory leak. >> >> Fixes: a753e53d517b ("eal: add device event monitor framework") >> Cc: stable@dpdk.org >> >> Signed-off-by: Yunjian Wang >> --- >> lib/librte_eal/common/eal_common_dev.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/librte_eal/common/eal_common_dev.c >> b/lib/librte_eal/common/eal_common_dev.c >> index 9e4f09d..363a2ca 100644 >> --- a/lib/librte_eal/common/eal_common_dev.c >> +++ b/lib/librte_eal/common/eal_common_dev.c >> @@ -526,6 +526,7 @@ static int cmp_dev_name(const struct rte_device *dev, >> const void *_name) >> */ >> if (event_cb->active == 0) { >> TAILQ_REMOVE(&dev_event_cbs, event_cb, next); >> + free(event_cb->dev_name); >> free(event_cb); >> ret++; >> } else { >> -- >> 1.8.3.1 Acked-by: Jeff Guo