diff options
author | Stefan Beller <sbeller@google.com> | 2015-03-20 17:28:04 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-23 11:12:58 -0700 |
commit | 473091e21ef2dbee6087cdf0429858faf2b50740 (patch) | |
tree | e6c6dace9d3d3f51bb0900ed1bca2b3764626c61 /merge-recursive.c | |
parent | d687839c29624de4b00ac22a6d8160172b357e14 (diff) | |
download | git-473091e21ef2dbee6087cdf0429858faf2b50740.tar.gz |
merge-recursive: fix memleaks
These string_list instances were allocated by get_renames() and
get_unmerged for the sole use of this caller, and the function is
responsible for freeing them, not just their contents.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 771f5e21b0..1c9c30db6c 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1858,6 +1858,9 @@ int merge_trees(struct merge_options *o, string_list_clear(re_head, 0); string_list_clear(entries, 1); + free(re_merge); + free(re_head); + free(entries); } else clean = 1; |