summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 629c658..3a66849 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1155,6 +1155,8 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
if (o->dst_index) {
discard_index(o->dst_index);
*o->dst_index = o->result;
+ } else {
+ discard_index(&o->result);
}
done: