[gnome-online-accounts/gnome-3-22] kerberos: Style fix



commit 419511933b1b24bbe161885dca37ba3db1eb88e8
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Mar 3 19:42:18 2017 +0100

    kerberos: Style fix
    
    It's good to consolidate all the scope level resource deallocation in
    one place. Since we have an 'out' label now, let's make use of it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779548

 src/goabackend/goakerberosprovider.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index 34be5a0..ee025fa 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -1323,7 +1323,7 @@ dbus_proxy_reload_properties_sync (GDBusProxy    *proxy,
   char *name;
   char *name_owner = NULL;
   GVariant *value;
-  GVariantIter *iter;
+  GVariantIter *iter = NULL;
   gboolean ret = FALSE;
 
   name_owner = g_dbus_proxy_get_name_owner (proxy);
@@ -1349,11 +1349,11 @@ dbus_proxy_reload_properties_sync (GDBusProxy    *proxy,
       g_free (name);
       g_variant_unref (value);
     }
-  g_variant_iter_free (iter);
 
   ret = TRUE;
 
  out:
+  g_clear_pointer (&iter, (GDestroyNotify) g_variant_iter_free);
   g_free (name_owner);
   return ret;
 }


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