Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp34624ybk; Fri, 8 May 2020 17:43:56 -0700 (PDT) X-Google-Smtp-Source: APiQypKslKDuTZHNgJh7pddRRp0EaSqvyoFJs7vMeWVmxvB2NkwslW83QVPhXpOgyPb6YXeMFTAz X-Received: by 2002:a17:906:3b18:: with SMTP id g24mr4284999ejf.65.1588985036697; Fri, 08 May 2020 17:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588985036; cv=none; d=google.com; s=arc-20160816; b=jkOuXEogwU1Kf5+0KA1gLZL9b8E3IMmpA1Y1XjdQUhUlQH7hc0/FwDUfVDzCYGzGgi 9FqDsdwnB2nMUdcl2zcL14+g7F3YQKoZdHNTkFzCZ59hWgZfOAj5k7dXxWviWZyZ0jsl YxdBbCuyae2B0Hxk3HSlSDPARegNRumpWR0ufWdiTCcHuL2cGS6WfoFbRWLcVBZn9V6X jpaXouN5fQGUQDMtVCnPPads9tMLXnVscJPMQWILoXfNa/PrOHaH7Teh1pVyGsXmNYQe c/cBP/YRVTaKXOcbqExeeyQUuHQHWvXHagqVqvZjAwGx/qhaWva+MG8hRcDuTyv6GFKY PeNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=ozIjLgtGXedmYhvZ4l+7O/unLkxBijNjLQ3qXb2v46g=; b=flb1N/Rzn9tMwaA5Bsmrpwx1eeGAVxDCdQa+thzXk+l0+0wp9eWaIw752eT0sBCj5x 2JfEvTKHEgA5Rm6bJgpFa/YWxLCK6cCBY/Cc60AYwapoWDimtCD/xVUxTxCQ2ShNdjte 0yUNdb0XjvIjGelDSztPEMybnK3yE0UboGFk9CFGatyI2upybFi+mzoeYn91q4c0xdKg ibDIt5sgDxlBQzNci2/ck/zjLOFYUf9BEZZ2flVzif9Ft+2XCTzCLMDYsRhrU2Lpj6ZB CiDxQAy2xWBjZ7JtpVRCOFywW1LwnQ5HV84Jmb9plRMsGMWChUS3j1dF8DwUKqVhP3bF ERXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si1873129ejh.219.2020.05.08.17.43.33; Fri, 08 May 2020 17:43:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728543AbgEIAjh (ORCPT + 99 others); Fri, 8 May 2020 20:39:37 -0400 Received: from mga14.intel.com ([192.55.52.115]:33453 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727984AbgEIAjg (ORCPT ); Fri, 8 May 2020 20:39:36 -0400 IronPort-SDR: DlQMED5PG9/bApDPWXnAQZii1JMGNLkksb9dutMsp9aAvxTSLhu+K938jkr+SPv/qwnT5WZbhz K/fdGjAqQbHg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 17:39:36 -0700 IronPort-SDR: 6aweANgd2jw2UYAToWycQaYabf94KOq5DMw032Ic41kd5k9VQ+8qWBslqeA2e+rQP9mkAtPpOO rZTAf/sMRpTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,369,1583222400"; d="scan'208";a="435967229" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by orsmga005.jf.intel.com with ESMTP; 08 May 2020 17:39:36 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 177F9301C4C; Fri, 8 May 2020 17:39:36 -0700 (PDT) Date: Fri, 8 May 2020 17:39:36 -0700 From: Andi Kleen To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Kajol Jain , John Garry , Jin Yao , Kan Liang , Cong Wang , Kim Phillips , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, Vince Weaver , Stephane Eranian Subject: Re: [RFC PATCH v3 06/14] perf evsel: fix 2 memory leaks Message-ID: <20200509003936.GH3538@tassilo.jf.intel.com> References: <20200508053629.210324-1-irogers@google.com> <20200508053629.210324-7-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508053629.210324-7-irogers@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07, 2020 at 10:36:21PM -0700, Ian Rogers wrote: > If allocated, perf_pkg_mask and metric_events need freeing. All these patches at the beginning look like straight forward bug fixes and are really independent of the new features. For them Reviewed-by: Andi Kleen > > Signed-off-by: Ian Rogers > --- > tools/perf/util/evsel.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c > index 28683b0eb738..05bb46baad6a 100644 > --- a/tools/perf/util/evsel.c > +++ b/tools/perf/util/evsel.c > @@ -1263,6 +1263,8 @@ void evsel__exit(struct evsel *evsel) > zfree(&evsel->group_name); > zfree(&evsel->name); > zfree(&evsel->pmu_name); > + zfree(&evsel->per_pkg_mask); > + zfree(&evsel->metric_events); > perf_evsel__object.fini(evsel); > } > > -- > 2.26.2.645.ge9eca65c58-goog >