From: Josh Micich Date: Thu, 14 May 2009 19:44:10 GMT Subject: Re: [PATCH 1/3] '--missing' option for mktree: re-added strbuf_release(&p_uq), Updated man page Message-ID: In-Reply-To: <7vprecxlrw.fsf@alter.siamese.dyndns.org> On Wed, May 13, 2009 at 11:04 PM, Junio C Hamano wrote: >>               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