[grilo] core: Do not use g_clear_pointer()



commit 0814a841ac48f7aa8864b51d6c8e88095ca8134a
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Mon Jan 27 10:45:51 2014 +0100

    core: Do not use g_clear_pointer()
    
    To avoid requiring glib 2.34

 src/grl-registry.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/grl-registry.c b/src/grl-registry.c
index 1a01349..1488a54 100644
--- a/src/grl-registry.c
+++ b/src/grl-registry.c
@@ -1725,8 +1725,12 @@ grl_registry_add_config_from_resource (GrlRegistry *registry,
   }
 
 bail:
-  g_clear_pointer (&keyfile, g_key_file_free);
-  g_clear_pointer (&bytes, g_bytes_unref);
+  if (keyfile) {
+    g_key_file_free (keyfile);
+  }
+  if (bytes) {
+    g_bytes_unref (bytes);
+  }
 
   return ret;
 }


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