Re: [PATCH 1/3] '--missing' option for mktree: re-added strbuf_release(&p_uq), Updated man page
On Wed, May 13, 2009 at 11:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
>> path = strbuf_detach(&p_uq, NULL);
>> + append_to_tree(mode, sha1, path);
>> + strbuf_release(&p_uq);
>> + return;
>> }
>> append_to_tree(mode, sha1, path);
>> }
>
> Ehh, why? detach already detaches the allocated buffer from strbuf and
> there is nothing to clean up by strbuf_release().
>
My bad. While re-basing my work to fe0bb5, the strbuf_release() call
went missing, but I didn't notice you had also changed:
- path = p_uq.buf;
+ path = strbuf_detach(&p_uq, NULL);
That is much nicer