Re: [PATCH 2/3] xdiff: refactor a function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phillip Wood <phillip.wood123@xxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux