From: Johannes Schindelin Date: Fri, 22 May 2020 20:50:37 GMT Subject: Re: [PATCH v3 04/12] bisect--helper: reimplement `bisect_autostart` shell function in C Message-ID: In-Reply-To: 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