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



commit adb05014950c37e5c20b99c71710e8637cd822eb
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jun 28 10:45:22 2016 +0200

    view-container: Don't leak the GtkTreePath
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768130

 src/photos-view-container.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-view-container.c b/src/photos-view-container.c
index ba2c4b3..238b126 100644
--- a/src/photos-view-container.c
+++ b/src/photos-view-container.c
@@ -118,6 +118,8 @@ photos_view_container_item_activated (PhotosViewContainer *self, const gchar * i
 {
   GObject *object;
 
+  g_clear_pointer (&self->current_path, (GDestroyNotify) gtk_tree_path_free);
+
   self->current_path = gtk_tree_path_copy (path);
   object = photos_base_manager_get_object_by_id (self->item_mngr, id);
 


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