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