Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp603015rwl; Wed, 29 Mar 2023 06:18:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZN+QgyS+8SO2I16YhCUtYjgz0lPkhgOfVHOCxdZIdEEoiiVsDQAwZdqt+i7pDSvmBwIOWW X-Received: by 2002:a17:906:f6cc:b0:932:290d:12e4 with SMTP id jo12-20020a170906f6cc00b00932290d12e4mr20158818ejb.25.1680095908036; Wed, 29 Mar 2023 06:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095908; cv=none; d=google.com; s=arc-20160816; b=BewNCz5O5ZLxHzo6ybW2wCykjMeNvoLLs+mpHlVVwPmrePrKk6ANUs/ZTW18Elz7Tt P3JKyc0vE6IdC9GPZek96C2wnjoIBx9pnZGotjfXPoQdzlaP1pARdXURZ4bV8Mg7RTmq 1KVTs5AV4aZf45f0ngWLcRWNSVwWJAFfKv8nxB8KHpYeBwgE1MKMIHeg0pNmjmMPgSqq zeI2xdh71uBks6VTJ5/d4UJPqEVSVH53YEgvogYFfe437C0Ep+l1/h5ZoZHMLHWqEz/Q rruIknEGY7AZIY5xcubv/i7BqwN8AdmokTlPNEzlTxVFJv/PeBaeHb1P1wrcqCwnC8B9 cQ2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e6IkpntYkpr7jsejIx+7bmZ5zdPLvd8Khuz+AY2I7j8=; b=W62fUQeKRCHMRPkcuCwuPQYtNl0d9CIlw8htbp4dpAJFVEM/AP7/TFHZk1naAOp1bU IvwPVsgnH1KzfKzZuotbFEcK2L7PeLCKJF9UOXwlquiWrtSUD2J15HkOymY78UQh83mJ p8IuqKk4mSyiIojvRfq1Dj/KsPFvZd8Wg5N+AmiHTCdEMVw797wwWOe043imvJsD297Z 5iWmXcdBali5pCCD894IqKsEG94H1cyER/WQqmlT/XElNwj2U6ur2Wer8k1W0rR5+aKB xwllvpYsuYzHp0vjfe7t80q3LSkgo3i+USIaX8epSBAjwdIBZIiXTFv457mVTyEoq6sX +tPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UzAv00Qh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv9-20020a170907080900b0093e277f4cc2si16296849ejb.429.2023.03.29.06.18.03; Wed, 29 Mar 2023 06:18:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UzAv00Qh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbjC2NRw (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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)