mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-04 12:41:39 +00:00
hostnamed: avoid using NULL in error path
https://bugzilla.redhat.com/show_bug.cgi?id=1047335
This commit is contained in:
committed by
Colin Guthrie
parent
e88356c965
commit
04bbe7a7e0
@@ -637,7 +637,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);
|
||||
@@ -669,7 +669,7 @@ static int connect_bus(DBusConnection **_bus) {
|
||||
fail:
|
||||
dbus_connection_close(bus);
|
||||
dbus_connection_unref(bus);
|
||||
|
||||
fail2:
|
||||
dbus_error_free(&error);
|
||||
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user