From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 578E07D30 for ; Mon, 22 Jan 2018 15:49:10 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 06:49:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,396,1511856000"; d="scan'208";a="21626086" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jan 2018 06:49:09 -0800 To: Jasvinder Singh , dev@dpdk.org Cc: bernard.iremonger@intel.com, john.mcnamara@intel.com References: <20180122141428.106166-1-jasvinder.singh@intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 22 Jan 2018 14:49:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180122141428.106166-1-jasvinder.singh@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] lib/librte_flow_classify: fix memory leak issue 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: Mon, 22 Jan 2018 14:49:11 -0000 On 1/22/2018 2:14 PM, Jasvinder Singh wrote: > Free allocated memory of the rule if not added to the table. > > Coverity issue: 257032 > Fixes: 50bdac5916d9 ("flow_classify: remove table id parameter from API") > > Signed-off-by: Jasvinder Singh Reviewed-by: Ferruh Yigit > --- > lib/librte_flow_classify/rte_flow_classify.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c > index 6fa6a74..55492a6 100644 > --- a/lib/librte_flow_classify/rte_flow_classify.c > +++ b/lib/librte_flow_classify/rte_flow_classify.c > @@ -560,6 +560,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls, > return rule; > } > } > + free(rule); > return NULL; > } > >