summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/dbus-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/dbus-core.c b/config/dbus-core.c
index 28881596f..eab72a530 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -87,7 +87,8 @@ teardown(void)
dbus_connection_unref(bus_info.connection);
RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
- RemoveGeneralSocket(bus_info.fd);
+ if (bus_info.fd != -1)
+ RemoveGeneralSocket(bus_info.fd);
bus_info.fd = -1;
bus_info.connection = NULL;