Re: [PATCH 1/1] Don't free remote->name after fetch
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 14, 2016, 17:52 UTC
- Message-ID
- <xmqqh9cvaca3.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CALnYDJNS9QAtu37a76Q6N3C=GRbfgU8Xq3g7F1q7vX+b=rwOOA@mail.gmail.com>
Keith McGuigan <kmcguigan@twopensource.com> writes:
> As an alternative, I could xstrdup each instance where remote->name is appended, > which would make the string_list a homogenous dup'd list, which we > could then free.
Yeah, I think that is the right way to fix it, even though I agree with you that a small leak you introduced is probably better than unwanted freeing we currently have.