daemon/dbus: safe check added - validating the user_data
authorAmarnath Valluri <amarnath.valluri@linux.intel.com>
Tue, 18 Jun 2013 14:04:16 +0000 (17:04 +0300)
committerAmarnath Valluri <amarnath.valluri@linux.intel.com>
Tue, 18 Jun 2013 14:07:10 +0000 (17:07 +0300)
src/daemon/dbus/gsignond-dbus-server.c

index b5d2b1d..7c96ea0 100644 (file)
@@ -381,7 +381,8 @@ _on_name_lost (GDBusConnection *connection,
                gpointer         user_data)
 {
     INFO ("Lost (or failed to acquire) the name '%s' on the on bus connection '%p'", name, connection);
-    if (user_data) g_object_unref (G_OBJECT (user_data));
+    if (user_data && GSIGNOND_IS_DBUS_SERVER(user_data)) 
+        g_object_unref (G_OBJECT (user_data));
 }
 
 static void