[nautilus/gnome-3-20] query-editor: unref file in update_information_label()



commit 6a72075d29feaae68bcb7d2562cce81fe3833164
Author: Ernestas Kulik <ernestask src gnome org>
Date:   Thu Jul 21 11:40:05 2016 +0300

    query-editor: unref file in update_information_label()
    
    window-slot binds with query-editor via a property, which results in
    nautilus_query_editor_set_location() being called on construction and
    location changes. That function in turn calls
    update_information_label(), which takes a ref on the file, but does not
    release it. This can result in a crash with remote bookmarks when
    connecting/disconnecting or switching back and forth.
    
    This commit fixes that by adding an unref to update_information_label().

 src/nautilus-query-editor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index a9e452a..15acc25 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -135,6 +135,7 @@ update_information_label (NautilusQueryEditor *editor)
                 gtk_label_set_label (GTK_LABEL (priv->label), label);
 
                 g_free (uri);
+                nautilus_file_unref (file);
         }
 }
 


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