Re: [PATCH 3/3] Correct conditions to free textconv result data
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 22, 2016, 23:08 UTC
- Message-ID
- <xmqqfuwk4a3y.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACsJy8BWgDFq_Dv=omkpDBa_pUF7zKr9cFftNL-KxtMcTkc5-w@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 13 quoted lines
> On Tue, Feb 23, 2016 at 1:12 AM, Jeff King <peff@peff.net> wrote: >> On Mon, Feb 22, 2016 at 01:06:46PM -0500, Jeff King wrote: >> >>> Is there a case I'm missing here where we actually leak memory or try to >>> free non-allocated memory? I didn't see it. >> >> By the way, I saw only patches 2/3 and 3/3 on the list. So maybe there >> is something interesting going on in 1/3, or in a cover letter that >> didn't make it. :) > > The only thing common in this series is it's the result of > -Wwrite-strings. 1/3 changes some "char *" to "const char *", you > don't miss anything.
While reading Peff's clarification patch, I did find the assignment of "" to the *out pointer disturbing. That part of your patch (I presume that is what you mean by the above) may want to be revived.
Thanks.