git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Clement Mabileau <mabileau.clement@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	ctmbl via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] Fix mem leak in branch.c due to not-free newly added virtual_name variable
Date: Wed, 22 Mar 2023 21:00:54 +0100	[thread overview]
Message-ID: <bd5207a0-9783-6a15-93da-0904ecd21341@gmail.com> (raw)
In-Reply-To: <xmqqmt44enj3.fsf@gitster.g>


On 22/03/2023 17:52, Junio C Hamano wrote:
> "ctmbl via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> 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.

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.


  reply	other threads:[~2023-03-22 20:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22  9:42 [PATCH 0/2] branch: improve error log on branch not found by checking remotes refs ClementMabileau via GitGitGadget
2023-03-22  9:42 ` [PATCH 1/2] " ctmbl via GitGitGadget
2023-03-22  9:42 ` [PATCH 2/2] Fix mem leak in branch.c due to not-free newly added virtual_name variable ctmbl via GitGitGadget
2023-03-22 16:52   ` Junio C Hamano
2023-03-22 20:00     ` Clement Mabileau [this message]
2023-03-22 20:52       ` Junio C Hamano
2023-03-22 20:03 ` [PATCH v2] branch: improve error log on branch not found by checking remotes refs ClementMabileau via GitGitGadget
2023-03-22 22:25   ` Junio C Hamano
2023-03-23 15:51     ` Clement Mabileau
2023-04-04 13:30       ` Clement Mabileau
2023-04-04 16:24         ` Junio C Hamano
2023-04-05  9:15           ` Clement Mabileau
2023-04-05 11:43   ` [PATCH v3] " ClementMabileau via GitGitGadget

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd5207a0-9783-6a15-93da-0904ecd21341@gmail.com \
    --to=mabileau.clement@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).