git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Correctly initialize 'installed_handlers'
@ 2020-05-08  7:05 Force Charlie via GitGitGadget
  2020-05-08  8:33 ` Carlo Marcelo Arenas Belón
  0 siblings, 1 reply; 4+ messages in thread
From: Force Charlie via GitGitGadget @ 2020-05-08  7:05 UTC (permalink / raw)
  To: git; +Cc: Force Charlie, Force Charlie

From: Force Charlie <charlieio@outlook.com>

Because static variables are not initialized properly,
temporary files may not be deleted when receive-pack receives a signal.

Signed-off-by: Force Charlie <charlieio@outlook.com>
---
    Correctly initialize 'installed_handlers'
    
    Because static variables are not initialized properly, temporary files
    may not be deleted when receive-pack receives a signal.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-630%2Ffcharlie%2Fincoming_fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-630/fcharlie/incoming_fix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/630

 tmp-objdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tmp-objdir.c b/tmp-objdir.c
index 91c00567f4d..c1ccf78e5ed 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -123,7 +123,7 @@ static int setup_tmp_objdir(const char *root)
 
 struct tmp_objdir *tmp_objdir_create(void)
 {
-	static int installed_handlers;
+	static int installed_handlers = 0;
 	struct tmp_objdir *t;
 
 	if (the_tmp_objdir)

base-commit: 07d8ea56f2ecb64b75b92264770c0a664231ce17
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-08 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-08  7:05 [PATCH] Correctly initialize 'installed_handlers' Force Charlie via GitGitGadget
2020-05-08  8:33 ` Carlo Marcelo Arenas Belón
2020-05-08 15:36   ` Junio C Hamano
2020-05-08 17:24     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).