summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-12 14:31:33 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-12 14:31:33 -0800
commitc09988ad940338eae5e2dbaa492bc4705ec5cb6a (patch)
treeff7e96e58958a313fef9190c12282ca9df744c5b /unpack-trees.c
parentc18b86734113ee2aeb0e140c922c8fbd4accc860 (diff)
parenta16cc8b24710b7426468ac0dc3194170e6113385 (diff)
downloadgit-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.c2
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: