diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-12 14:31:33 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-12 14:31:33 -0800 |
commit | c09988ad940338eae5e2dbaa492bc4705ec5cb6a (patch) | |
tree | ff7e96e58958a313fef9190c12282ca9df744c5b /unpack-trees.c | |
parent | c18b86734113ee2aeb0e140c922c8fbd4accc860 (diff) | |
parent | a16cc8b24710b7426468ac0dc3194170e6113385 (diff) | |
download | git-c09988ad940338eae5e2dbaa492bc4705ec5cb6a.tar.gz |
Merge branch 'jc/unpack-trees-plug-leak'
* jc/unpack-trees-plug-leak:
unpack_trees: plug leakage of o->result
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 629c658c46..3a66849e38 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: |