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

[PATCH] Correctly initialize 'installed_handlers'

From
FGForce Charlie via GitGitGadget <gitgitgadget@gmail.com>
Date
May 8, 2020, 07:05 UTC
Message-ID
<pull.630.git.1588921514146.gitgitgadget@gmail.com>
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
Next: Carlo Marcelo Arenas Belón
Message 1 of 4 in “Correctly initialize 'installed_handlers'”
  1. Correctly initialize 'installed_handlers'Force Charlie via GitGitGadget, May 8, 2020
  2. Carlo Marcelo Arenas BelónMay 8, 2020
  3. Junio C HamanoMay 8, 2020
  4. Jeff KingMay 8, 2020

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.