teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0117-hostnamed-avoid-using-NULL-in-error-path.patch

9fc0f6
From 7722552d5eade35dbb6c433e82774fcd2e157232 Mon Sep 17 00:00:00 2001
9fc0f6
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
9fc0f6
Date: Mon, 6 Jan 2014 12:16:55 +0000
9fc0f6
Subject: [PATCH] hostnamed: avoid using NULL in error path
9fc0f6
9fc0f6
https://bugzilla.redhat.com/show_bug.cgi?id=1047335
9fc0f6
---
9fc0f6
 src/hostname/hostnamed.c | 4 ++--
9fc0f6
 1 file changed, 2 insertions(+), 2 deletions(-)
9fc0f6
9fc0f6
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
9fc0f6
index 6a43aeb..0c24b65 100644
9fc0f6
--- a/src/hostname/hostnamed.c
9fc0f6
+++ b/src/hostname/hostnamed.c
9fc0f6
@@ -637,7 +637,7 @@ static int connect_bus(DBusConnection **_bus) {
9fc0f6
         if (!bus) {
9fc0f6
                 log_error("Failed to get system D-Bus connection: %s", bus_error_message(&error));
9fc0f6
                 r = -ECONNREFUSED;
9fc0f6
-                goto fail;
9fc0f6
+                goto fail2;
9fc0f6
         }
9fc0f6
 
9fc0f6
         dbus_connection_set_exit_on_disconnect(bus, FALSE);
9fc0f6
@@ -669,7 +669,7 @@ static int connect_bus(DBusConnection **_bus) {
9fc0f6
 fail:
9fc0f6
         dbus_connection_close(bus);
9fc0f6
         dbus_connection_unref(bus);
9fc0f6
-
9fc0f6
+fail2:
9fc0f6
         dbus_error_free(&error);
9fc0f6
 
9fc0f6
         return r;