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

2006-03-28 Thread Leonard den Ottolander
Pavel, On Tue, 2006-03-28 at 09:58 +0200, Pavel Tsekov wrote: You guess .. I guess you should stop guessing and start reading code . What a prick you are. It's very difficult to have a constructive discussion with somebody who is constantly trying to put down the efforts of others :-( .

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

2006-03-27 Thread Pavel Tsekov
On Thu, 2006-02-02 at 20:33 +0100, Leonard den Ottolander wrote: Ran mc from a temporary build dir and copied Syntax to ~/.mc/cedit/ . Tried editing a file and saw a segfault when the non existent syntax file is attempted to be loaded. #0 edit_get_rule (edit=0x92e8dc0, byte_index=-1)

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

2006-03-27 Thread Leonard den Ottolander
Hi Pavel, 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? Leonard. -- mount -t life -o ro /dev/dna

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

2006-03-27 Thread Leonard den Ottolander
Hi Pavel, On Mon, 2006-03-27 at 21:57 +0200, Leonard den Ottolander wrote: doesn't this cause a memory leak? Or is that memory freed elsewhere? Last statement in the skipped edit_free_syntax_rules() is a syntax_g_free(edit-rules). I guess we need a free. The zeroing by g_malloc0 only obscures

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

2006-03-27 Thread Pavel Tsekov
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

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

2006-03-27 Thread Pavel Tsekov
On Mon, 2006-03-27 at 21:57 +0200, Leonard den Ottolander wrote: doesn't this cause a memory leak? Or is that memory freed elsewhere? Last statement in the skipped edit_free_syntax_rules() is a syntax_g_free(edit-rules). I guess we need a free. You guess .. I guess you should stop

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

2006-03-26 Thread Leonard den Ottolander
Hi, On Thu, 2006-02-02 at 20:33 +0100, Leonard den Ottolander wrote: Ran mc from a temporary build dir and copied Syntax to ~/.mc/cedit/ . Tried editing a file and saw a segfault when the non existent syntax file is attempted to be loaded. #0 edit_get_rule (edit=0x92e8dc0, byte_index=-1)