Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 647BD187C for ; Wed, 29 Mar 2023 13:17:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD7BAC433D2; Wed, 29 Mar 2023 13:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680095861; bh=eYMlXTpAv3olNUNbQddTkVLZaNagBLnt987Vfa/sIaM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UzAv00Qhx+TEYtb67jXxO4A81EZu6uBfCC5KfVhCORCn1vOpzlFeNWrZaHykhZbwl gBGsCdQNT8ZwuY8TYpiTB713rnt9GGNgc7vJ6HhRMy7DNYB8u4RG7qoOH7RtctjdsR tco5hicYoZ1WpZzQUz+HvfLBDJ1FfIB5ukuQWUqYidySv9eUMuLcDhz+tcuDhj53o8 LJzTsstwlddPu+/mfkBOYVNt8yZMeTGWspj77TU7J0v7kAFxFuV3b8d7V9yVeg+saE 2Z0i/MrQYKmf2bgKtis8Q6+yvPhTlPiM+ozRHBstGx8Ij7WutW4LCOtuXeod6pq/O3 YWO2oMrH1//0Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 93BAA4052D; Wed, 29 Mar 2023 10:17:38 -0300 (-03) Date: Wed, 29 Mar 2023 10:17:38 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Tom Rix , James Clark , Andi Kleen , Kan Liang , German Gomez , Sandipan Das , Andres Freund , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v1 4/6] perf annotate: Own objdump_path and disassembler_style strings Message-ID: References: <20230328235543.1082207-1-irogers@google.com> <20230328235543.1082207-5-irogers@google.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230328235543.1082207-5-irogers@google.com> X-Url: http://acmel.wordpress.com Em Tue, Mar 28, 2023 at 04:55:41PM -0700, Ian Rogers escreveu: > @@ -3231,8 +3235,10 @@ void annotation_options__init(struct annotation_options *opt) > } > > > -void annotation_options__exit(struct annotation_options *opt __maybe_unused) > +void annotation_options__exit(struct annotation_options *opt) > { > + free(opt->disassembler_style); > + free(opt->objdump_path); > } Changed this: diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 7338249dfdd94390..08e041a9b9cc279e 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -3237,8 +3237,8 @@ void annotation_options__init(struct annotation_options *opt) void annotation_options__exit(struct annotation_options *opt) { - free(opt->disassembler_style); - free(opt->objdump_path); + zfree(&opt->disassembler_style); + zfree(&opt->objdump_path); } void annotation_config__init(struct annotation_options *opt)