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 DC3A0A04C7; Fri, 18 Sep 2020 10:13:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E25C81D8F3; Fri, 18 Sep 2020 10:13:58 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D07EB1D8E3 for ; Fri, 18 Sep 2020 10:13:56 +0200 (CEST) IronPort-SDR: J3TT9mjlZpcnZnXsVaifJ4N97P2fdWA2GEkWAc8TjHoxdMn091RGBmeHU/vbMxwR8DWugjGsQj Erlaafkcb5Qw== X-IronPort-AV: E=McAfee;i="6000,8403,9747"; a="147630288" X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="147630288" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 01:13:51 -0700 IronPort-SDR: V3/LfTdAhha6vGvX0UUhuRpSkcYewCqckWcu3Ok2Dv32dqCr4Jw0UTgp+bHHNKamslCI7e5YzK nfks08P+D7Hw== X-IronPort-AV: E=Sophos;i="5.77,274,1596524400"; d="scan'208";a="452664467" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.213.216.173]) ([10.213.216.173]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2020 01:13:50 -0700 To: Rory Sexton , dev@dpdk.org Cc: marko.kovacevic@intel.com References: <20200729083754.1044630-1-rory.sexton@intel.com> From: David Hunt Message-ID: <45cab392-4364-23ba-a44b-83b200db2b9c@intel.com> Date: Fri, 18 Sep 2020 09:13:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200729083754.1044630-1-rory.sexton@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-dev] [PATCH 1/1] examples/vm_power_manager: fix resource leak 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 Rory, On 29/7/2020 9:37 AM, Rory Sexton wrote: > Fix memory leak where variable oob_enable can go out of scope leaking > the storage it points to. > > Coverity issue: 337674 > Fixes: 95f648ff9ee ("examples/vm_power: make branch ratio threshold per core") > > Signed-off-by: Rory Sexton > --- > examples/vm_power_manager/main.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c > index 77797b1e1..0242cca1a 100644 > --- a/examples/vm_power_manager/main.c > +++ b/examples/vm_power_manager/main.c > @@ -209,6 +209,7 @@ parse_args(int argc, char **argv) > } > if (branch_ratio <= 0.0 || branch_ratio > 100.0) { > printf("invalid branch ratio specified\n"); > + free(oob_enable); > return -1; > } > for (i = 0; i < ci->core_count; i++) { Acked-by: David Hunt