1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-09 21:06:11 +02:00

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>
This commit is contained in:
Stefan Beller 2015-03-20 17:28:04 -07:00 committed by Junio C Hamano
parent d687839c29
commit 473091e21e

View File

@ -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;