Re: [PATCH 2/2] Fix mem leak in branch.c due to not-free newly added virtual_name variable
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 22, 2023, 16:52 UTC
- Message-ID
- <xmqqmt44enj3.fsf@gitster.g>
- In-Reply-To
- <27f27f3afd76fc974350c0c94e20307879eead84.1679478126.git.gitgitgadget@gmail.com>
"ctmbl via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: ctmbl <mabileau.clement@gmail.com> > > 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.
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 ;-).
Thanks.