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

[PATCH] repository: cache->squash_msg is freed twice

From
AGAZero13 via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 18, 2025, 15:26 UTC
Message-ID
<pull.2132.git.git.1766071566022.gitgitgadget@gmail.com>
From: Greg Funni <gfunni234@gmail.com>

Thankfully, it is set to NULL, so no security consequences. However, this is still a mistake that must be rectified.

Signed-off-by: Greg Funni <gfunni234@gmail.com>
---
    repository: cache->squash_msg is freed twice
    
    Thankfully, it is set to NULL, so no security consequences.
    
    However, this is still a mistake that must be rectified.
    
    Signed-off-by: Greg Funni gfunni234@gmail.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2132%2FAZero13%2Ftwice-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2132/AZero13/twice-v1
Pull-Request: https://github.com/git/git/pull/2132
 repository.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/repository.c b/repository.c
index 863f24411b..c7e75215ac 100644
--- a/repository.c
+++ b/repository.c
@@ -349,7 +349,6 @@ out:
 
 static void repo_clear_path_cache(struct repo_path_cache *cache)
 {
-	FREE_AND_NULL(cache->squash_msg);
 	FREE_AND_NULL(cache->squash_msg);
 	FREE_AND_NULL(cache->merge_msg);
 	FREE_AND_NULL(cache->merge_rr);

base-commit: c4a0c8845e2426375ad257b6c221a3a7d92ecfda
-- 
gitgitgadget
Next: AZero13 via GitGitGadget
Message 1 of 4 in “repository: cache->squash_msg is freed twice”
  1. repository: cache->squash_msg is freed twiceAZero13 via GitGitGadget, Dec 18, 2025
  2. repository: remove duplicate free of cache->squash_msgAZero13 via GitGitGadget, Dec 18, 2025
  3. Eric SunshineDec 18, 2025
  4. Junio C HamanoDec 19, 2025

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.