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

[PATCH] fast-import: Fix uninitialized variable

From
Simon Hausmann <simon@lst.de>
Date
May 23, 2007, 21:00 UTC
Message-ID
<200705232300.22278.simon@lst.de>

Fix uninitialized last_object->no_free variable that is accessed in store_object.

Signed-off-by: Simon Hausmann <simon@lst.de>
---
 fast-import.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index ffa00fd..0ddf8fe 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1122,6 +1122,7 @@ static void store_tree(struct tree_entry *root)
 		|| le->pack_id != pack_id) {
 		lo.data = NULL;
 		lo.depth = 0;
+		lo.no_free = 0;
 	} else {
 		mktree(t, 0, &lo.len, &old_tree);
 		lo.data = old_tree.buffer;
-- 
1.5.2.24.g93d4
Message 1 of 1 in “fast-import: Fix uninitialized variable”
  1. fast-import: Fix uninitialized variableSimon Hausmann, May 23, 2007

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.