Skip to contentSkip to conversation

fast-import: Fix uninitialized variable

PATCH New Simon Hausmann 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fast-import: Fix uninitialized variable

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

---
 fast-import.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fast-import.c +1 -0
index ffa00fd..0ddf8fe 100644
@@ -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;
Signature · 1 line
1.5.2.24.g93d4