Merge branch 'fc/unpack-trees-leakfix'

* fc/unpack-trees-leakfix:
  unpack-trees: plug a memory leak
This commit is contained in:
Junio C Hamano
2013-09-04 12:36:41 -07:00

View File

@@ -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);