[gnome-photos] camera-cache: Style fix



commit 9fcf3659a6832c881eaaab8497dcee7128be7c1d
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Jan 14 13:29:07 2017 +0100

    camera-cache: Style fix

 src/photos-camera-cache.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-camera-cache.c b/src/photos-camera-cache.c
index 2edb529..8f1828e 100644
--- a/src/photos-camera-cache.c
+++ b/src/photos-camera-cache.c
@@ -107,7 +107,7 @@ photos_camera_cache_equipment_query_executed (GObject *source_object, GAsyncResu
 {
   GTask *task = G_TASK (user_data);
   TrackerSparqlConnection *connection = TRACKER_SPARQL_CONNECTION (source_object);
-  TrackerSparqlCursor *cursor;
+  TrackerSparqlCursor *cursor = NULL;
   GError *error;
 
   error = NULL;
@@ -115,11 +115,13 @@ photos_camera_cache_equipment_query_executed (GObject *source_object, GAsyncResu
   if (error != NULL)
     {
       g_task_return_error (task, error);
-      return;
+      goto out;
     }
 
   tracker_sparql_cursor_next_async (cursor, NULL, photos_camera_cache_cursor_next, g_object_ref (task));
-  g_object_unref (cursor);
+
+ out:
+  g_clear_object (&cursor);
 }
 
 


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