From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3B7C6A045E for ; Fri, 31 May 2019 14:16:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E74511B94F; Fri, 31 May 2019 14:16:02 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 73B4F1C0B; Fri, 31 May 2019 14:15:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2019 05:15:58 -0700 X-ExtLoop1: 1 Received: from mszychow-mobl1.ger.corp.intel.com (HELO [10.252.13.140]) ([10.252.13.140]) by orsmga004.jf.intel.com with ESMTP; 31 May 2019 05:15:57 -0700 To: Reshma Pattan , dev@dpdk.org Cc: stable@dpdk.org, bruce.richardson@intel.com References: <20190529124317.30611-1-reshma.pattan@intel.com> From: "Laatz, Kevin" Message-ID: <59c84529-e187-5445-1436-3ae0b2449a4d@intel.com> Date: Fri, 31 May 2019 13:15:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190529124317.30611-1-reshma.pattan@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-stable] [PATCH] lib/telemetry: fix memory leak X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 29/05/2019 13:43, Reshma Pattan wrote: > Free the `values` pointer before returning > from rte_telemetry_command_ports_all_stat_values() > to avoid memory leak. > > Fixes: c12cefa379 ("telemetry: fix mapping of statistics") > CC: stable@dpdk.org > CC: bruce.richardson@intel.com > > Signed-off-by: Reshma Pattan > --- > lib/librte_telemetry/rte_telemetry_parser.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_telemetry/rte_telemetry_parser.c b/lib/librte_telemetry/rte_telemetry_parser.c > index 9bc16eef4..e9297021a 100644 > --- a/lib/librte_telemetry/rte_telemetry_parser.c > +++ b/lib/librte_telemetry/rte_telemetry_parser.c > @@ -342,6 +342,7 @@ rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry, > goto fail; > } > > + free(values); > return 0; > > fail: Acked-by: Kevin Laatz