From: "Rubén Justo" <rjusto@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 06/11] branch: fix a leak in cmd_branch
Date: Sat, 17 Jun 2023 00:50:46 +0200 [thread overview]
Message-ID: <2ff000c5-5b90-6271-a676-78c5bc93a054@gmail.com> (raw)
In-Reply-To: <20230612034639.GF306352@coredump.intra.peff.net>
On 11-jun-2023 23:46:39, Jeff King wrote:
> On Sun, Jun 11, 2023 at 08:50:05PM +0200, Rubén Justo wrote:
>
> > We don't have a common clean-up section in cmd_branch(). To avoid
> > refactoring and keep the fix simple, and while we find a better
> > solution, let's silence the leak-hunter making the list static.
>
> Gross. :)
XD
>
> If we are just going to annotate here, I'd prefer to use UNLEAK(). It
> makes it more obvious this is about leak-checking, and doesn't imply
> that we otherwise care about the lifetime of this field. Like:
>
> diff --git a/builtin/branch.c b/builtin/branch.c
> index e6c2655af6..075e580d22 100644
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -832,6 +832,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
> if (list)
> setup_auto_pager("branch", 1);
>
> + UNLEAK(sorting_options);
> +
> if (delete) {
> if (!argc)
> die(_("branch name required"));
OK. Will do this.
Thank you for reviewing the change with a wide view.
next prev parent reply other threads:[~2023-06-16 22:50 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-11 18:29 tests: mark as passing with SANITIZE=leak Rubén Justo
2023-06-11 18:49 ` [PATCH 01/11] rev-parse: fix a leak with --abbrev-ref Rubén Justo
2023-06-12 3:12 ` Jeff King
2023-06-16 22:34 ` Rubén Justo
2023-06-11 18:49 ` [PATCH 02/11] config: fix a leak in git_config_copy_or_rename_section_in_file Rubén Justo
2023-06-12 3:14 ` Jeff King
2023-06-11 18:49 ` [PATCH 03/11] remote: fix a leak in query_matches_negative_refspec Rubén Justo
2023-06-12 3:17 ` Jeff King
2023-06-16 22:37 ` Rubén Justo
2023-06-11 18:49 ` [PATCH 04/11] branch: fix a leak in dwim_and_setup_tracking Rubén Justo
2023-06-12 3:21 ` Jeff King
2023-06-16 22:45 ` Rubén Justo
2023-06-11 18:49 ` [PATCH 05/11] branch: fix a leak in setup_tracking Rubén Justo
2023-06-12 3:26 ` Jeff King
2023-06-16 22:46 ` Rubén Justo
2023-06-11 18:50 ` [PATCH 06/11] branch: fix a leak in cmd_branch Rubén Justo
2023-06-12 3:46 ` Jeff King
2023-06-16 22:50 ` Rubén Justo [this message]
2023-06-11 18:50 ` [PATCH 07/11] branch: fix a leak in inherit_tracking Rubén Justo
2023-06-12 3:48 ` Jeff King
2023-06-11 18:50 ` [PATCH 08/11] branch: fix a leak in check_tracking_branch Rubén Justo
2023-06-12 3:55 ` Jeff King
2023-06-11 18:50 ` [PATCH 09/11] branch: fix a leak in setup_tracking Rubén Justo
2023-06-12 3:59 ` Jeff King
2023-06-11 18:50 ` [PATCH 10/11] config: fix a leak in git_config_copy_or_rename_section_in_file Rubén Justo
2023-06-12 4:05 ` Jeff King
2023-06-16 23:04 ` Rubén Justo
2023-06-11 18:50 ` [PATCH 11/11] tests: mark as passing with SANITIZE=leak Rubén Justo
2023-06-11 21:23 ` Rubén Justo
2023-06-12 4:06 ` Jeff King
2023-06-16 23:14 ` Rubén Justo
2023-06-13 19:34 ` Junio C Hamano
2023-06-16 23:27 ` [PATCH v2 0/5] " Rubén Justo
2023-06-16 23:34 ` [PATCH v2 1/5] rev-parse: fix a leak with --abbrev-ref Rubén Justo
2023-06-16 23:34 ` [PATCH v2 2/5] branch: fix a leak in setup_tracking Rubén Justo
2023-06-16 23:34 ` [PATCH v2 3/5] branch: fix a leak in cmd_branch Rubén Justo
2023-06-16 23:34 ` [PATCH v2 4/5] config: fix a leak in git_config_copy_or_rename_section_in_file Rubén Justo
2023-06-16 23:35 ` [PATCH v2 5/5] tests: mark as passing with SANITIZE=leak Rubén Justo
2023-06-16 23:45 ` [PATCH v2 0/5] " Junio C Hamano
2023-06-17 5:48 ` Jeff King
2023-06-17 6:35 ` Rubén Justo
2023-06-17 6:37 ` [PATCH v3 " Rubén Justo
2023-06-17 6:40 ` [PATCH v3 1/5] rev-parse: fix a leak with --abbrev-ref Rubén Justo
2023-06-17 6:41 ` [PATCH v3 2/5] branch: fix a leak in setup_tracking Rubén Justo
2023-06-17 6:41 ` [PATCH v3 3/5] branch: fix a leak in cmd_branch Rubén Justo
2023-06-17 6:41 ` [PATCH v3 4/5] config: fix a leak in git_config_copy_or_rename_section_in_file Rubén Justo
2023-06-17 6:41 ` [PATCH v3 5/5] tests: mark as passing with SANITIZE=leak Rubén Justo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ff000c5-5b90-6271-a676-78c5bc93a054@gmail.com \
--to=rjusto@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).