[PATCH] Re: Segfault on loading of non existent syntax file

Pavel Tsekov ptsekov at gmx.net
Tue Mar 28 07:54:41 UTC 2006


> On Mon, 2006-03-27 at 11:08 +0200, Pavel Tsekov wrote:
> > How about the attached fix ?
> 
> I assume g_malloc0 initializes edit->rules with zeros? This indeed fixes
> the crash, but doesn't this cause a memory leak? Or is that memory freed
> elsewhere?

In edit_read_syntax_rules () after the big "for" block:


    if (!edit->rules[0])
        syntax_g_free (edit->rules);

-- 
Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer



More information about the mc-devel mailing list