Re: [Vimprobable-users] [PATCH] Possible fix for crash on :echo
Vimprobable is a lean web browser optimised for full keyboard control
Brought to you by:
hanness
From: Hans-Peter D. <hpd...@gm...> - 2011-09-16 15:16:11
|
Hi, On 15:00 Fri 16 Sep , Daniel Carl wrote: > Hi! > > The patch introducs memory leaks because only the script function that is used > for the javascript and echo command frees the given arg->s, other function do > not free the argument. We should decide where to free the memory. I'm (like Hannes) in favor of a free-by-caller convention for the Arg-functions. Thomas tried to implement free-by-callee in those patches. It would be nice if we could finally get consistent behaviour regarding mallocing and freeing. This means, that script() shouldn't free anything and we should instead track down all the places where it's used and call free() there. This should also remove the need for a SAVEFREE macro. Regards, HP |