systemd/debian/patches/hostnamed-avoid-using-NULL-in-error-path.patch
Jon Severinsson 87c3557857 Add v208-stable patch series.
This commit was created using the following commands and then fixing up debian/patches/series manually.
$ git config diff.renames false
$ git rebase --onto debian/208-5 v208 stable/v208-stable
$ git checkout -b patch-queue/experimental HEAD
$ gbp-pq export --no-patch-numbers
$ git add --ignore-removal debian/patches/
2014-07-07 12:29:26 +02:00

32 lines
1.0 KiB
Diff

From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 6 Jan 2014 12:16:55 +0000
Subject: hostnamed: avoid using NULL in error path
https://bugzilla.redhat.com/show_bug.cgi?id=1047335
---
src/hostname/hostnamed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 6a43aeb..0c24b65 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -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;