diff options
author | William Jon McCann <jmccann@redhat.com> | 2012-09-14 14:20:51 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2012-09-14 14:22:55 -0400 |
commit | 25f694dd10a0bcf8904eed6f11e7bfc1a3e68255 (patch) | |
tree | 54729206a40f25729df6c87f6b72c8fe82778dfb | |
parent | d1e52eb847dcabf7a2be07dbd71cfcb4e0805306 (diff) | |
download | at-spi2-atk-25f694dd10a0bcf8904eed6f11e7bfc1a3e68255.tar.gz |
Make cleanup more robust
https://bugzilla.gnome.org/show_bug.cgi?id=684042
-rw-r--r-- | atk-adaptor/bridge.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c index be1810c..f21072f 100644 --- a/atk-adaptor/bridge.c +++ b/atk-adaptor/bridge.c @@ -940,6 +940,7 @@ atk_bridge_adaptor_cleanup (void) dbus_connection_remove_filter (spi_global_app_data->bus, signal_filter, NULL); droute_context_unregister (spi_global_app_data->droute, spi_global_app_data->bus); dbus_connection_unref (spi_global_app_data->bus); + spi_global_app_data->bus = NULL; } for (l = spi_global_app_data->direct_connections; l; l = l->next) @@ -953,15 +954,16 @@ atk_bridge_adaptor_cleanup (void) 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_slist_free (clients); clients = NULL; - g_object_unref (spi_global_cache); - g_object_unref (spi_global_leasing); - g_object_unref (spi_global_register); + g_clear_object (&spi_global_cache); + g_clear_object (&spi_global_leasing); + g_clear_object (&spi_global_register); if (spi_global_app_data->main_context) g_main_context_unref (spi_global_app_data->main_context); |