[gnome-online-accounts/gnome-3-20] kerberos: Don't leak the result



commit ab3a7b01f4a8f3080171e238d8121efd85e1246a
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Mar 9 23:41:32 2017 +0100

    kerberos: Don't leak the result
    
    Spotted by Matthias Clasen.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779548

 src/goabackend/goakerberosprovider.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index b6b4e14..8598fe1 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -1323,7 +1323,7 @@ static gboolean
 dbus_proxy_reload_properties_sync (GDBusProxy    *proxy,
                                    GCancellable  *cancellable)
 {
-  GVariant *result;
+  GVariant *result = NULL;
   char *name;
   char *name_owner = NULL;
   GVariant *value;
@@ -1358,6 +1358,7 @@ dbus_proxy_reload_properties_sync (GDBusProxy    *proxy,
 
  out:
   g_clear_pointer (&iter, (GDestroyNotify) g_variant_iter_free);
+  g_clear_pointer (&result, (GDestroyNotify) g_variant_unref);
   g_free (name_owner);
   return ret;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]