From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ferruh.yigit@intel.com>
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by dpdk.org (Postfix) with ESMTP id 578E07D30
 for <dev@dpdk.org>; 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 <jasvinder.singh@intel.com>, dev@dpdk.org
Cc: bernard.iremonger@intel.com, john.mcnamara@intel.com
References: <20180122141428.106166-1-jasvinder.singh@intel.com>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <b38ccb55-6a70-955d-89e9-c8f8071eb2a9@intel.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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 <jasvinder.singh@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

> ---
>  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;
>  }
>  
>