Commit 7a02e93e by Vicent Marti

merge: Plug memory leak

parent a1f5d691
...@@ -1726,13 +1726,13 @@ int git_merge__iterators( ...@@ -1726,13 +1726,13 @@ int git_merge__iterators(
} }
} }
if (!given_opts || !given_opts->metric)
git__free(opts.metric);
error = index_from_diff_list(out, diff_list, error = index_from_diff_list(out, diff_list,
(opts.tree_flags & GIT_MERGE_TREE_SKIP_REUC)); (opts.tree_flags & GIT_MERGE_TREE_SKIP_REUC));
done: done:
if (!given_opts || !given_opts->metric)
git__free(opts.metric);
git_merge_diff_list__free(diff_list); git_merge_diff_list__free(diff_list);
git_iterator_free(empty_ancestor); git_iterator_free(empty_ancestor);
git_iterator_free(empty_ours); git_iterator_free(empty_ours);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment