git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] prefix_path(): Unconditionally free result of prefix_path

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2015, 18:09 UTC
Message-ID
<xmqq8ud2ew1k.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150505175612.GA9709@peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
>> >>   1. in blame, we assign the result to a const char that may also point
>> >>      straight into to argv, but we never actually free either way
>> 
>> The return value from add_prefix() that is what prefix_path()
>> returned eventually becomes scoreboard.path that needs to be kept
>> during the lifetime of the process, and I think there isn't much
>> point doing the "free() immediately before exiting".
>
> Yeah, sorry, I meant to say that more explicitly, but clearly didn't. I
> think it is fine as-is.

Yeah, sorry, I didn't mean "You are wrong and here is why". I was merely agreeing with you.

Thanks for running grep over the codebase to check possible remaining problems.

Previous: Jeff King
Message 8 of 8 in “prefix_path(): Unconditionally free result of prefix_path”
  1. prefix_path(): Unconditionally free result of prefix_pathStefan Beller, May 4, 2015
  2. Eric SunshineMay 4, 2015
  3. Junio C HamanoMay 4, 2015
  4. Jeff KingMay 5, 2015
  5. Stefan BellerMay 5, 2015
  6. Junio C HamanoMay 5, 2015
  7. Jeff KingMay 5, 2015
  8. Junio C HamanoMay 5, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.