anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

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

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