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>

Stefan Beller committed Mar 20, 2015 at 17:28 UTC 473091e21ef2dbee6087cdf0429858faf2b50740
1 file changed +3
merge-recursive.c
+3
@@ -1858,6 +1858,9 @@ int merge_trees(struct merge_options *o,
1858 string_list_clear(re_head, 0);
1859 string_list_clear(entries, 1);
1860
1861 + free(re_merge);
1862 + free(re_head);
1863 + free(entries);
1864 }
1865 else
1866 clean = 1;