diff options
author | Shawn Landden <shawnlandden@gmail.com> | 2012-12-03 00:50:55 +0000 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-12-03 01:56:42 +0100 |
commit | b779821b8fdcb3f2bdd0c362bceaae3c76ed9678 (patch) | |
tree | eb972cea988f61bbb53ce8b3900ef464c91d0817 /src/timedate | |
parent | a705d08519d26cd2ee581cd04cb70888b3a55b62 (diff) |
timedated: do not incorrectly close non-opened dbus connection
Fix the fallowing error when no system dbus available:
Failed to get system D-Bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
process 14920: arguments to dbus_connection_close() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2889.
This is normally a bug in some application using the D-Bus library.
process 14920: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2776.
This is normally a bug in some application using the D-Bus library.
Diffstat (limited to 'src/timedate')
-rw-r--r-- | src/timedate/timedated.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 40ba255090..784dadc631 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -936,7 +936,7 @@ static int connect_bus(DBusConnection **_bus) { if (!bus) { log_error("Failed to get system D-Bus connection: %s", bus_error_message(&error)); r = -ECONNREFUSED; - goto fail; + goto fail2; } dbus_connection_set_exit_on_disconnect(bus, FALSE); @@ -968,7 +968,7 @@ static int connect_bus(DBusConnection **_bus) { fail: dbus_connection_close(bus); dbus_connection_unref(bus); - +fail2: dbus_error_free(&error); return r; |