diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2017-06-23 11:02:47 +0900 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2017-07-23 12:59:45 -0500 |
commit | 3c40c52a73409ff0467ce192e910f04e24e23564 (patch) | |
tree | 9109851bcfc15351636f8e43908c4d76a54c8f98 | |
parent | 79e6331c743db0365112c10ca49133b2d1a8480f (diff) | |
download | at-spi2-core-3c40c52a73409ff0467ce192e910f04e24e23564.tar.gz |
Decrements the reference count of session_bus
dbus_bus_get increments reference count of a DBusConnection.
It is callers responsibility to all dbus_connection_unref after use.
-rw-r--r-- | atspi/atspi-misc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c index 89fe9e75..46d1c114 100644 --- a/atspi/atspi-misc.c +++ b/atspi/atspi-misc.c @@ -1533,7 +1533,7 @@ get_accessibility_bus_address_dbus (void) g_warning ("Error retrieving accessibility bus address: %s: %s", error.name, error.message); dbus_error_free (&error); - return NULL; + goto out; } { @@ -1545,12 +1545,14 @@ get_accessibility_bus_address_dbus (void) DBUS_TYPE_INVALID)) { dbus_message_unref (reply); - return NULL; + goto out; } address = g_strdup (tmp_address); dbus_message_unref (reply); } +out: + dbus_connection_unref (session_bus); return address; } |