Phillip Wood [off-list ref] writes:
Oh well spotted, xdl_do_diff() only frees "env" if the myers algorithm
has an error, if the patience or histogram algorithms have an error
then they do not free "env" and it is not freed by xdl_do_diff(). This
patch inadvertently fixes that leak when merging but not when calling
xdl_do_diff() to compact conflicts in zealous mode or when doing a
plain diff. I think the simplest fix is to have xdl_do_diff() free
"env" when there is an error what ever algorithm is used.
Heh, I didn't even look at the other uses of xdl_do_diff(); I am
glad you did.
I'll try to put a patch together to fix the other cases. If we fix
this leak in xdl_do_diff() then maybe we should go back to returning
-1 in the hunk above and explain in the log message why that is ok.
Thanks.