Browse Source

Merge branch 'fc/unpack-trees-leakfix'

* fc/unpack-trees-leakfix:
  unpack-trees: plug a memory leak
maint
Junio C Hamano 12 years ago
parent
commit
94f00694e2
  1. 4
      unpack-trees.c

4
unpack-trees.c

@ -1154,8 +1154,10 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options @@ -1154,8 +1154,10 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options

o->src_index = NULL;
ret = check_updates(o) ? (-2) : 0;
if (o->dst_index)
if (o->dst_index) {
discard_index(o->dst_index);
*o->dst_index = o->result;
}

done:
clear_exclude_list(&el);

Loading…
Cancel
Save