On Mon, May 14, 2012 at 05:44:55PM +0200, Lars Ellenberg wrote:
> > By the way, I suspect Lars' suggestion would work fine.  I would 
> > certainly explain what the "better" patch is in the comments when you 
> > apply this one.
> 
> My suggestion would be:
> 
> 
> diff --git a/lib/clplumbing/GSource.c b/lib/clplumbing/GSource.c
> --- a/lib/clplumbing/GSource.c
> +++ b/lib/clplumbing/GSource.c
> @@ -1506,6 +1506,7 @@ Gmain_timeout_add_full(gint priority
>       g_source_set_callback(source, function, data, notify); 
>  
>       append->gsourceid = g_source_attach(source, NULL);
> +     g_source_unref(source);
>       return append->gsourceid;
>  
>  }
> 
> 
> Then recompile and reinstall libglue.
> Please see if that also fixes the leak for you
> (and does not explode).

Hm. Looks like it *does* explode (aka segfault)
on various occasions throughout at least heartbeat core and lrmd,
probably when a timeout callback tries to remove itself
explicitly before returning FALSE.

Guess we need to stay bug-to-bug compatible here,
unless the users of Gmain_timeout_* from clplumbing
turn out to be less than a handful and can be audited.
Which may well be the case.

Though it would break the ABI, so it would be a lot of effort,
and I frankly doubt this is worth it for clplumbing
at this point in its lifecycle.

 :-(

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to