setup_bare_git_dir(): help static analysis
commitda6f847559d8794f25da9f7c090929baebce7751
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 4 May 2017 13:56:47 +0000 (4 15:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 May 2017 03:18:19 +0000 (8 12:18 +0900)
tree63fe2bd5a22d023c7b1c756056cfd9ccf59cd85c
parent41fc6b33fc0cef748f84906810bb36fcd491f0a1
setup_bare_git_dir(): help static analysis

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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c