[Geany-devel] SM r4968 bug - and more

Dimitar Zhekov dimitar.zhekov at xxxxx
Wed Jun 16 15:56:36 UTC 2010

On Wed, 16 Jun 2010 11:43:51 +0400
Eugene Arshinov <earshinov at gmail.com> wrote:

> On Tue, 15 Jun 2010 21:53:22 +0300%
> Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> > 
> > It's sm_cmd_props(), in particular when run with --config.
> > You should preserve alternate_configdir, like in my sm.
> Well, actually I preserve it (see the code of sm_cmd_props() and
> optentries_aux array in main.c).

I wanted to say that you should not let main.c free it. The alternate
sm I sent on may-19 does that (main.c @@ -707,7 +746,10 @@), but the
app->configdir = g_strdup(alternate_config) you suggest is better.

> The bug may be in main.c:parse_command_line_options() where we
> simply assign app->configdir = alternate_config.  And after that,
> in several places, we use setptr() and g_free() on app->configdir

Exactly (except it's not a bug in sm-less Geany).
I tested with g_strdup(), just to be sure - works.

E-gards: Jimmy

More information about the Devel mailing list