Re: [evolution-patches] Patches for leaks in evolution



On Fri, 2005-07-08 at 20:43 +0200, Kjartan Maraas wrote:
> 
> > In normal processing this value gets transferred to the message list
> > search pointer, i guess it only leaks if the processing gets
> cancelled.
> > 
> > You should also add a m->search = NULL in regen_list_regened() after
> the
> > pointer gets transferred to the messagelist to avoid a double-free
> or
> > worse.
> > 
> > Should be ok with that + ready to commit.
> > 
> I tried wrapping my head around that but failed. Could you show me
> where
> exactly you mean? 

        if (m->ml->search && m->ml->search != m->search)
                g_free (m->ml->search);
	m->ml->search = m->search;


There ^^

it sets the search directly on the messagelist.  So m->search should
just be set to NULL directly after, if it is to be freed in the free()
func.





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