[PATCH] PolicyKit refcounting
David Zeuthen
david at fubar.dk
Wed May 24 15:57:25 PDT 2006
Hi,
Sorry for the lag.
On Wed, 2006-05-24 at 11:18 +0200, Ludwig Nussel wrote:
> Hi,
>
> The reference was added using g_object_weak_ref, so use
> g_object_weak_unref to remove it otherwise the objects gets
> destroyed too early causing a crash later.
Yea, I can reproduce the crasher too (though not systematically) but I'm
not sure this is the right fix as polit-manager.c:session_finalized()
never references the object as it by design is called when the object
have been finalized. It merely looks through a hash table and tries to
remove the element for which the value equals the pointer.
I'm curious if it fixed it for you though? Maybe just not unreffing the
object made the difference but then there might be leaks elsewhere.
So, I've got a rather huge patch (~3000 lines) that I will commit over
holiday weekend (Sat -> Mon) and then I will try to make some sense out
of the refcounting issues we currently have. Then we should be good to
release 0.2 with a big "needs security review" label all over it.
David
More information about the hal
mailing list