Subject: Re: [PATCH 2/2] Fix mem leak in branch.c due to not-free newly added virtual_name variable

From: Clement Mabileau <[email-masked]>
Date: Wed, 22 Mar 2023 21:00:54 +0100

On 22/03/2023 17:52, Junio C Hamano wrote:
> "ctmbl via GitGitGadget" <[email-masked]> writes:
> 
>> From: ctmbl <[email-masked]>
>>
>> Previous commit introduced virtual_name variable which is the name of
>> the branch in case it has been a remote ref (used to check whether the
>> user simply forgot `--remote` flag) but didn't free it.
>> Call FREE_AND_NULL(virtual_name) to solve it.
> 
> Do not introduce a bug in 1/2 and fix it in 2/2, unless it is
> absolutely necessary.

I didn't know this practice, thanks for letting me know :-)

> Squash this one into the previous commit, before sending your
> patches out to the list.  The public do not have to learn your
> earlier mistakes, and before sending your patches out is the perfect
> chance for you to pretend to be a person that is more perfect than
> you are ;-).

I just did it!

Thanks for the review.