mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-02 19:59:21 +02:00
gdbus: Cleanup global static data
https://bugzilla.gnome.org/show_bug.cgi?id=711799
This commit is contained in:
@@ -2645,7 +2645,10 @@ initable_init (GInitable *initable,
|
||||
|
||||
G_LOCK (message_bus_lock);
|
||||
if (alive_connections == NULL)
|
||||
alive_connections = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
{
|
||||
alive_connections = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
G_CLEANUP_IN (alive_connections, g_hash_table_unref, G_CLEANUP_PHASE_LATE);
|
||||
}
|
||||
g_hash_table_insert (alive_connections, connection, connection);
|
||||
G_UNLOCK (message_bus_lock);
|
||||
|
||||
|
@@ -368,10 +368,13 @@ g_dbus_error_register_error (GQuark error_domain,
|
||||
g_assert (dbus_error_name_to_re == NULL); /* check invariant */
|
||||
quark_code_pair_to_re = g_hash_table_new ((GHashFunc) quark_code_pair_hash_func,
|
||||
(GEqualFunc) quark_code_pair_equal_func);
|
||||
G_CLEANUP_IN (quark_code_pair_to_re, g_hash_table_unref, G_CLEANUP_PHASE_LATE);
|
||||
|
||||
dbus_error_name_to_re = g_hash_table_new_full (g_str_hash,
|
||||
g_str_equal,
|
||||
NULL,
|
||||
(GDestroyNotify) registered_error_free);
|
||||
G_CLEANUP_IN (dbus_error_name_to_re, g_hash_table_unref, G_CLEANUP_PHASE_LATE);
|
||||
}
|
||||
|
||||
if (g_hash_table_lookup (dbus_error_name_to_re, dbus_error_name) != NULL)
|
||||
|
Reference in New Issue
Block a user