summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-12 22:31:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-12 22:31:33 (GMT)
commitc09988ad940338eae5e2dbaa492bc4705ec5cb6a (patch)
treeff7e96e58958a313fef9190c12282ca9df744c5b /unpack-trees.c
parentc18b86734113ee2aeb0e140c922c8fbd4accc860 (diff)
parenta16cc8b24710b7426468ac0dc3194170e6113385 (diff)
downloadgit-c09988ad940338eae5e2dbaa492bc4705ec5cb6a.zip
git-c09988ad940338eae5e2dbaa492bc4705ec5cb6a.tar.gz
git-c09988ad940338eae5e2dbaa492bc4705ec5cb6a.tar.bz2
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 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: