]> git.neil.brown.name Git - git.git/commit
xdiff/xmerge: fix memory leak in xdl_merge
authorPatrick Steinhardt <ps@pks.im>
Tue, 23 Feb 2016 11:59:17 +0000 (12:59 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Feb 2016 20:58:26 +0000 (12:58 -0800)
commit4867f1184c943f7738bb7b42cab2e62cf16cdb18
tree170a9a156b6e224cfa133f7182363e02b44f0f14
parent833e48259e23aea76f3765d28d1b2200332301f7
xdiff/xmerge: fix memory leak in xdl_merge

When building the script for the second file that is to be merged
we have already allocated memory for data structures related to
the first file. When we encounter an error in building the second
script we only free allocated memory related to the second file
before erroring out.

Fix this memory leak by also releasing allocated memory related
to the first file.

Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xmerge.c