dbus-gmain.c mem leak

David Zeuthen david at fubar.dk
Mon Apr 18 20:38:01 PDT 2005


(adding dbus list back to Cc)

On Mon, 2005-04-18 at 23:30 -0400, Havoc Pennington wrote:
> On Mon, 2005-04-18 at 23:23 -0400, David Zeuthen wrote:
> > On Mon, 2005-04-18 at 23:15 -0400, Havoc Pennington wrote:
> > > Suggest putting "assert (handler->source == NULL)" right before the
> > > free(handler) and see if it breaks maybe?
> > 
> > The way I read the glib source code we need to also unref() the source
> > after destroy()'ing it since the attach() we do after creating a new one
> > increases the refcount. 
> > 
> > How about the attached patch? It fixes the leaks and I've tested it with
> > hal (who does a lot of dbus traffic now everything is multiple
> > processes).
> > 
> 
> Looks good to me, thanks.

Ok, I've committed the patch to CVS. Seems the Cc got lost somewhere so
here is the patch

 http://cvs.freedesktop.org/dbus/dbus/glib/dbus-gmain.c?r1=1.39&r2=1.40

Cheers,
David




More information about the dbus mailing list