Re: [PATCH v3 04/12] bisect--helper: reimplement `bisect_autostart` shell function in C
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 22, 2020, 20:50 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2005222247500.56@tvgsbejvaqbjf.bet>
- In-Reply-To
- <nycvar.QRO.7.76.6.2005222058380.56@tvgsbejvaqbjf.bet>
Hi Miriam,
On Fri, 22 May 2020, Johannes Schindelin wrote:
Show 13 quoted lines
> On Thu, 23 Apr 2020, Miriam Rubio wrote:
>
> > + /*
> > + * TRANSLATORS: Make sure to include [Y] and [n] in your
> > + * translation. The program will only accept English input
> > + * at this point.
> > + */
> > + yesno = git_prompt(_("Do you want me to do it for you "
> > + "[Y/n]? "), PROMPT_ECHO);
>
> [...]
>
> I still think that we need to call `free(yesno);` or we leak memory.Never mind. I got fooled by the fact that `git_prompt()` returns `char *`. It actually returns the pointer `buf.buf` of a `static `strbuf buf`, so there is nothing to `free()` here.
Sorry for the noise, Dscho