Re: [PATCH v3 04/12] bisect--helper: reimplement `bisect_autostart` shell function in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Miriam,

On Fri, 22 May 2020, Johannes Schindelin wrote:

> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux