]> git.ipfire.org Git - thirdparty/git.git/commit - merge-recursive.c
merge-recursive: fix memory leak
authorKevin Willford <kewillf@microsoft.com>
Mon, 28 Aug 2017 20:28:27 +0000 (14:28 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Sep 2017 04:10:20 +0000 (13:10 +0900)
commite336bdc5b9bcb62982da9708dfb6e68150de72a3
treef7056c81e03690e81af9d50b6b1cfb8170eed733
parentedc74bc7f0c6884027e851ef09b2e0c9380dcd45
merge-recursive: fix memory leak

In merge_trees if process_renames or process_entry returns less
than zero, the method will just return and not free re_merge,
re_head, or entries.

This change cleans up the allocated variables before returning
to the caller.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c