hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Fri Nov 23 07:58:35 PST 2007
hald/hald_dbus.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 1f2b6056107295031c3a425bc0aac76d11e56bea
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Fri Nov 23 16:57:58 2007 +0100
fix possible segfault if singletons is NULL
Fixed segfault if the singletons Hashtable is NULL. This should
fix fd.o bug 11767 and 12287.
diff --git a/hald/hald_dbus.c b/hald/hald_dbus.c
index 091cc89..ae37d9d 100644
--- a/hald/hald_dbus.c
+++ b/hald/hald_dbus.c
@@ -5200,8 +5200,12 @@ 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 (G_UNLIKELY (!singletons)) {
+ HAL_ERROR (("Singleton table is not initialied/ is NULL"));
+ } else {
+ g_hash_table_foreach_remove (singletons, (GHRFunc) singleton_remove_by_connection, connection);
+ }
dbus_connection_unref (connection);
return DBUS_HANDLER_RESULT_HANDLED;
More information about the hal-commit
mailing list