[gtk+] Don't leak the queried file info



commit e709c965a4d9d48c8007905de7e715bc7fef728f
Author: William Jon McCann <william jon mccann gmail com>
Date:   Fri Feb 21 14:02:37 2014 -0500

    Don't leak the queried file info
    
    https://bugzilla.gnome.org/show_bug.cgi?id=554618

 gtk/gtkfilechooserwidget.c |    2 ++
 gtk/gtkfilesystemmodel.c   |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index fb50f73..6c2f1a2 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -3969,6 +3969,7 @@ file_system_model_got_thumbnail (GObject *object, GAsyncResult *res, gpointer da
   /* file was deleted */
   if (!_gtk_file_system_model_get_iter_for_file (model, &iter, file))
     {
+      g_object_unref (queried);
       gdk_threads_leave ();
       return;
     }
@@ -3982,6 +3983,7 @@ file_system_model_got_thumbnail (GObject *object, GAsyncResult *res, gpointer da
   _gtk_file_system_model_update_file (model, file, info);
 
   g_object_unref (info);
+  g_object_unref (queried);
 
   gdk_threads_leave ();
 }
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index b9f4d32..909359a 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -1229,6 +1229,8 @@ gtk_file_system_model_query_done (GObject *     object,
   id = node_get_for_file (model, file);
   gtk_file_system_model_sort_node (model, id);
 
+  g_object_unref (info);
+
   gdk_threads_leave ();
 }
 


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