From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <derrickstolee@github.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] clone: plug a miniscule leak
Date: Mon, 02 May 2022 10:12:22 -0700 [thread overview]
Message-ID: <xmqqzgjzzwnd.fsf@gitster.g> (raw)
In-Reply-To: <5e8eff95-d768-439d-e2df-d575a0038ffd@github.com> (Derrick Stolee's message of "Mon, 2 May 2022 09:43:05 -0400")
Derrick Stolee <derrickstolee@github.com> writes:
>> - if (option_origin != NULL)
>
> This technically wouldn't hit your rule, since "E" isn't just the
> variable name, as we typically do with our style. Is that something
> that Coccinelle automatically simplifies?
>
>> + if (option_origin != NULL) {
>
> Do you want to take this opportunity to drop the "!= NULL" here?
>
>> + free(remote_name);
>> remote_name = xstrdup(option_origin);
>> + }
>> > if (remote_name == NULL)
>
> Or do you want to keep similar style from the surrounding code?
I think that it is better to leave that particular clean-up to
the equals-null.cocci topic started by Elia; I know having them
separate would cause a merge conflict, but even if I change them
here, it will result in the same merge conflict anyway ;-)
next prev parent reply other threads:[~2022-05-02 17:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-01 5:17 [PATCH] clone: plug a miniscule leak Junio C Hamano
2022-05-02 13:43 ` Derrick Stolee
2022-05-02 17:12 ` Junio C Hamano [this message]
2022-05-02 20:39 ` Philip Oakley
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=xmqqzgjzzwnd.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
/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).