From cf410211d201b39f34442a3417f840a7d86a1222 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 15 Aug 2017 15:57:43 -0400 Subject: [PATCH] dbus-helpers: initialize bus name In the event that we're not on a message bus, we need to make sure we're passing NULL. Coverity CID: 163684 Closes: #918 Approved by: cgwalters --- src/app/rpmostree-dbus-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/rpmostree-dbus-helpers.c b/src/app/rpmostree-dbus-helpers.c index 4eed48e7..373ba47f 100644 --- a/src/app/rpmostree-dbus-helpers.c +++ b/src/app/rpmostree-dbus-helpers.c @@ -221,7 +221,7 @@ rpmostree_load_os_proxies (RPMOSTreeSysroot *sysroot_proxy, /* owned by sysroot_proxy */ GDBusConnection *connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (sysroot_proxy)); - const char *bus_name; + const char *bus_name = NULL; if (g_dbus_connection_get_unique_name (connection) != NULL) bus_name = BUS_NAME;