Comment 14 for bug 232557

Revision history for this message
In , Anders Kaseorg (andersk) wrote :

Created an attachment (id=37533)
patches for a few bad memory leaks

These three patches fix most of the really bad (per-session) memory leaks I found with valgrind. (Apply with `git am`.)

There is still one worrisome leak within dbus-glib that might or might not be ConsoleKit’s fault:

==4766== 2,400 bytes in 150 blocks are definitely lost in loss record 997 of 1,005
==4766== at 0x4C284A8: malloc (vg_replace_malloc.c:236)
==4766== by 0x6282514: g_malloc (gmem.c:134)
==4766== by 0x6297749: g_slice_alloc (gslice.c:836)
==4766== by 0x6298F62: g_slist_append (gslist.c:229)
==4766== by 0x4E394C1: dbus_g_connection_register_g_object (dbus-gobject.c:2373)
==4766== by 0x40F127: register_session (ck-session.c:147)
==4766== by 0x40F577: ck_session_new_with_parameters (ck-session.c:1249)
==4766== by 0x408FC7: collect_parameters_cb (ck-manager.c:1621)
==4766== by 0x40DF4F: job_completed (ck-session-leader.c:390)
==4766== by 0x59EB69D: g_closure_invoke (gclosure.c:766)
==4766== by 0x5A02DA8: signal_emit_unlocked_R (gsignal.c:3252)
==4766== by 0x5A04525: g_signal_emit_valist (gsignal.c:2983)

But at least it’s much smaller than the ones I fixed.