[gnome-online-accounts/gnome-3-22] kerberos: Don't leak the name_owner
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-22] kerberos: Don't leak the name_owner
- Date: Wed, 8 Mar 2017 18:15:24 +0000 (UTC)
commit fc28a70135f9b535fe779c8849dfb0e2a88277cb
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Mar 3 19:39:10 2017 +0100
kerberos: Don't leak the name_owner
https://bugzilla.gnome.org/show_bug.cgi?id=779548
src/goabackend/goakerberosprovider.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index 4c9ba70..34be5a0 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -1321,11 +1321,14 @@ dbus_proxy_reload_properties_sync (GDBusProxy *proxy,
{
GVariant *result;
char *name;
+ char *name_owner = NULL;
GVariant *value;
GVariantIter *iter;
+ gboolean ret = FALSE;
+ name_owner = g_dbus_proxy_get_name_owner (proxy);
result = g_dbus_connection_call_sync (g_dbus_proxy_get_connection (proxy),
- g_dbus_proxy_get_name_owner (proxy),
+ name_owner,
g_dbus_proxy_get_object_path (proxy),
"org.freedesktop.DBus.Properties",
"GetAll",
@@ -1336,7 +1339,7 @@ dbus_proxy_reload_properties_sync (GDBusProxy *proxy,
cancellable,
NULL);
if (result == NULL)
- return FALSE;
+ goto out;
g_variant_get (result, "(a{sv})", &iter);
while (g_variant_iter_next (iter, "{sv}", &name, &value))
@@ -1347,7 +1350,12 @@ dbus_proxy_reload_properties_sync (GDBusProxy *proxy,
g_variant_unref (value);
}
g_variant_iter_free (iter);
- return TRUE;
+
+ ret = TRUE;
+
+ out:
+ g_free (name_owner);
+ return ret;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]