Re: [PATCH v2 14/25] setup_discovered_git_dir(): help static analysis

2017-05-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 May 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Coverity reported a memory leak in this function. However, it can only > > be called once, as setup_git_directory() changes global state and hence > > is not reentrant. > > > >

Re: [PATCH v2 14/25] setup_discovered_git_dir(): help static analysis

2017-05-01 Thread Junio C Hamano
Johannes Schindelin writes: > Coverity reported a memory leak in this function. However, it can only > be called once, as setup_git_directory() changes global state and hence > is not reentrant. > > Mark the variable as static to indicate that this is a singleton. > >

[PATCH v2 14/25] setup_discovered_git_dir(): help static analysis

2017-04-28 Thread Johannes Schindelin
Coverity reported a memory leak in this function. However, it can only be called once, as setup_git_directory() changes global state and hence is not reentrant. Mark the variable as static to indicate that this is a singleton. Signed-off-by: Johannes Schindelin ---