threads / patch / 8284

patchfast-import: Fix uninitialized variable

Subject: [PATCH] fast-import: Fix uninitialized variable

## tl;dr

One message between May 23, 2007 and May 23, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Simon Hausmann· May 23, 2007, 21:00 UTC · lore

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(-)
Show changes to fast-import.c +1 −0
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

← back to recent threads