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



commit 1c7de47fa4c5923ab63fa2ceb0fd4541e962f32c
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 eb9f30a..dfd91d6 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -1324,7 +1324,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;
@@ -1359,6 +1359,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]