[gnome-photos] organize-collection-view: Don't leak the GtkTreePath



commit 1ac24991a98f308f077ff61bae23a02b455a4395
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Oct 20 22:10:57 2018 +0200

    organize-collection-view: Don't leak the GtkTreePath

 src/photos-organize-collection-view.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/photos-organize-collection-view.c b/src/photos-organize-collection-view.c
index 59a50351..97fe8c0a 100644
--- a/src/photos-organize-collection-view.c
+++ b/src/photos-organize-collection-view.c
@@ -430,10 +430,13 @@ photos_organize_collection_view_add_collection (PhotosOrganizeCollectionView *se
 
   path = photos_organize_collection_model_add_placeholder (PHOTOS_ORGANIZE_COLLECTION_MODEL (self->model));
   if (path == NULL)
-    return;
+    goto out;
 
   g_object_set (self->renderer_text, "editable", TRUE, NULL);
   gtk_tree_view_set_cursor_on_cell (GTK_TREE_VIEW (self), path, self->view_col, self->renderer_text, TRUE);
+
+ out:
+  gtk_tree_path_free (path);
 }
 
 


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