path: root/config
diff options
authorKeith Packard <>2016-09-14 22:40:32 -0700
committerKeith Packard <>2016-09-15 21:30:38 -0700
commit3caf671ed2a8a79856409a109355fc0f393d7aed (patch)
tree6e6f39109e742ee0203269fb4b16c2fb36167df4 /config
parent52d6a1e832a5e62289dd4f32824ae16a78dfd7e8 (diff)
config/dbus: Initialize dbus fd to -1 so teardown doesn't use fd 0
The dbus teardown code is called when the server fatal errors even if that is before dbus has ever been initialized. By statically initializing the value of bus_info.fd, we avoid calling RemoveNotifyFd on stdin. Signed-off-by: Keith Packard <> Reviewed-by: Julien Cristau <> Reviewed-by: Peter Hutterer <>
Diffstat (limited to 'config')
1 files changed, 1 insertions, 1 deletions
diff --git a/config/dbus-core.c b/config/dbus-core.c
index 3c85ad788..6d9a3f917 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -43,7 +43,7 @@ struct dbus_core_info {
OsTimerPtr timer;
struct dbus_core_hook *hooks;
-static struct dbus_core_info bus_info;
+static struct dbus_core_info bus_info = { .fd = -1 };
static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, void *arg);