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

Re: [PATCH] repository: fix free problem with repo_clear(the_repository)

From
Duy Nguyen <pclouds@gmail.com>
Date
May 9, 2018, 17:54 UTC
Message-ID
<CACsJy8DFnWreLW_9xTsxJejvgXcT9EGsZ91cx7h39QpP4_p4Bw@mail.gmail.com>
In-Reply-To
<CABPp-BHGLkEnYaR2rQqLRSraMgxW7E=fmS1=bGTVeSi2VrPKcw@mail.gmail.com>
On Wed, May 9, 2018 at 7:42 PM, Elijah Newren <newren@gmail.com> wrote:
Show 11 quoted lines
> On Wed, May 9, 2018 at 10:04 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
>> the_repository is special. One of the special things about it is that
>> it does not allocate a new index_state object like submodules but
>> points to the global the_index variable instead. As a global variable,
>> the_index cannot be free()'d.
>>
>> Add an exception for this in repo_clear(). In the future perhaps we
>> would be able to allocate the_repository's index on heap too. Then we
>> can remove revert this.
>
> "remove revert"?

It's obvious that double negatives are below me. I'm going to the next level with double positives! "remove" should be removed.

-- 
Duy
Previous: Elijah NewrenNext: Stefan Beller
Message 4 of 11 in “repository: fix free problem with repo_clear(the_repository)”
  1. repository: fix free problem with repo_clear(the_repository)Nguyễn Thái Ngọc Duy, May 9, 2018
  2. Brandon WilliamsMay 9, 2018
  3. Elijah NewrenMay 9, 2018
  4. Duy NguyenMay 9, 2018
  5. Stefan BellerMay 9, 2018
  6. Duy NguyenMay 9, 2018
  7. Stefan BellerMay 9, 2018
  8. Duy NguyenMay 10, 2018
  9. Junio C HamanoMay 10, 2018
  10. Stefan BellerMay 10, 2018
  11. repository: fix free problem with repo_clear(the_repository)Nguyễn Thái Ngọc Duy, May 10, 2018

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.