[PATCH] fix g_critical in local_server_message_handler
Rob Taylor
rob.taylor at codethink.co.uk
Tue Nov 13 16:42:01 PST 2007
The singletons hash table was possibly accessed when uninitialised on the
Disconnected signal, causing a G_CRITICAL error.
---
hald/hald_dbus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
index 091cc89..d12d740 100644
--- a/hald/hald_dbus.c
+++ b/hald/hald_dbus.c
@@ -5200,8 +5200,8 @@ local_server_message_handler (DBusConnection *connection,
helper_interface_handlers = g_slist_remove_link (helper_interface_handlers, i);
}
}
-
- g_hash_table_foreach_remove (singletons, (GHRFunc) singleton_remove_by_connection, connection);
+ if (singletons)
+ g_hash_table_foreach_remove (singletons, (GHRFunc) singleton_remove_by_connection, connection);
dbus_connection_unref (connection);
return DBUS_HANDLER_RESULT_HANDLED;
--
1.5.3.GIT
--------------000303050506080805030300
Content-Type: text/x-patch;
name="0002-make-massif-hald.sh-give-more-useful-output.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename*0="0002-make-massif-hald.sh-give-more-useful-output.patch"
More information about the hal
mailing list