diff options
| author | Junio C Hamano <gitster@pobox.com> | 2013-09-04 12:36:41 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2013-09-04 12:36:42 -0700 |
| commit | 94f00694e2529acada51e01d28e79fd5b19cd83f (patch) | |
| tree | 8534b6fbc238d1a63584c3fad5508a8f94e2cb55 | |
| parent | a62b071d5b018bc5849d5e9485b4adcdb16e7fa3 (diff) | |
| parent | e28f7641592c5b907df2f084112fa22a31500810 (diff) | |
| download | git-94f00694e2529acada51e01d28e79fd5b19cd83f.tar.xz | |
Merge branch 'fc/unpack-trees-leakfix'
* fc/unpack-trees-leakfix:
unpack-trees: plug a memory leak
| -rw-r--r-- | unpack-trees.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index bf01717015..1a61e6f363 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -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); |
