[glib] GDBusConnection leaks its GCredentials



commit 1220501ec86b87e6cfe8ab3eac4a1fc6ea7a8acc
Author: Christian Persch <chpe gnome org>
Date:   Tue Sep 14 19:38:14 2010 +0200

    GDBusConnection leaks its GCredentials
    
    ==7269== 144 bytes in 6 blocks are definitely lost in loss record 1,282 of 1,325
    ==7269==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==7269==    by 0x4056B74: g_malloc (gmem.c:164)
    ==7269==    by 0x406EDB6: g_slice_alloc (gslice.c:842)
    ==7269==    by 0x406EDFB: g_slice_alloc0 (gslice.c:854)
    ==7269==    by 0x413C627: g_type_create_instance (gtype.c:1867)
    ==7269==    by 0x412276A: g_object_constructor (gobject.c:1480)
    ==7269==    by 0x4121E5D: g_object_newv (gobject.c:1264)
    ==7269==    by 0x4121BD3: g_object_new (gobject.c:1176)
    ==7269==    by 0x417CFB9: g_credentials_new (gcredentials.c:156)
    ==7269==    by 0x41D9DBC: g_unix_credentials_message_deserialize (gunixcredentialsmessage.c:149)
    ==7269==    by 0x41C422C: g_socket_control_message_deserialize (gsocketcontrolmessage.c:198)
    ==7269==    by 0x41BFCE3: g_socket_receive_message (gsocket.c:3289)
    ==7269==    by 0x41D99CE: g_unix_connection_receive_credentials (gunixconnection.c:476)
    ==7269==    by 0x41FA829: _g_dbus_auth_run_server (gdbusauth.c:987)
    ==7269==    by 0x4205DDB: initable_init (gdbusconnection.c:2196)
    
    Bug #629689.

 gio/gdbusconnection.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 1960839..572b867 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -419,6 +419,9 @@ g_dbus_connection_finalize (GObject *object)
   if (connection->auth != NULL)
     g_object_unref (connection->auth);
 
+  if (connection->credentials)
+    g_object_unref (connection->credentials);
+
   if (connection->stream != NULL)
     {
       /* We don't really care if closing the stream succeeds or not */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]