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
This commit is contained in:
Jonathan Lebon 2017-08-15 15:57:43 -04:00 committed by Atomic Bot
parent c59c11f789
commit cf410211d2

View File

@ -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;