Release v2.6.0
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / bridge.c
index 738c10b..2df9889 100644 (file)
@@ -291,6 +291,10 @@ register_application (SpiBridge * app)
     if (!dbus_connection_send_with_reply (app->bus, message, &pending, -1)
         || !pending)
     {
+        if (pending)
+          dbus_pending_call_unref (pending);
+
+        dbus_message_unref (message);
         return FALSE;
     }
 
@@ -777,6 +781,8 @@ spi_atk_activate ()
           return;
         }
       spi_initialize_cache (treepath);
+      if (spi_global_app_data->bus)
+        droute_path_register (treepath, spi_global_app_data->bus);
     }
 }
 
@@ -959,13 +965,14 @@ atk_bridge_adaptor_cleanup (void)
 
       droute_context_unregister (spi_global_app_data->droute, connection);
       droute_unintercept_dbus (connection);
+      dbus_connection_close (connection);
       dbus_connection_unref (connection);
     }
   g_list_free (spi_global_app_data->direct_connections);
   spi_global_app_data->direct_connections = NULL;
 
   for (ls = clients; ls; ls = ls->next)
-    g_free (l->data);
+    g_free (ls->data);
   g_slist_free (clients);
   clients = NULL;