From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A930C74A5B for ; Wed, 29 Mar 2023 13:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230086AbjC2NRw (ORCPT ); Wed, 29 Mar 2023 09:17:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbjC2NRv (ORCPT ); Wed, 29 Mar 2023 09:17:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2427F423F; Wed, 29 Mar 2023 06:17:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A6FA861D0C; 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> 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 Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org 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)