[gnome-photos/wip/rishi/collection: 3/39] item-manager: Use g_auto*



commit 32ce007e47eedad4dffcb034ed67592c0711ed75
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Jan 24 12:20:53 2018 +0100

    item-manager: Use g_auto*

 src/photos-item-manager.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 573ed209..39de8900 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -1035,11 +1035,11 @@ PhotosBaseItem *
 photos_item_manager_create_item (PhotosItemManager *self, TrackerSparqlCursor *cursor)
 {
   GIOExtension *extension;
+  g_auto (GStrv) split_identifier = NULL;
   GType type;
   PhotosBaseItem *ret_val = NULL;
   const gchar *extension_name = "local";
-  gchar *identifier = NULL;
-  gchar **split_identifier = NULL;
+  g_autofree gchar *identifier = NULL;
 
   g_return_val_if_fail (PHOTOS_IS_ITEM_MANAGER (self), NULL);
   g_return_val_if_fail (TRACKER_SPARQL_IS_CURSOR (cursor), NULL);
@@ -1077,8 +1077,6 @@ photos_item_manager_create_item (PhotosItemManager *self, TrackerSparqlCursor *c
                                             NULL));
 
  out:
-  g_strfreev (split_identifier);
-  g_free (identifier);
   return ret_val;
 }
 


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