[nautilus] window-slot: plug memory leak
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window-slot: plug memory leak
- Date: Fri, 24 Jul 2015 20:11:09 +0000 (UTC)
commit bc51c3c598db363d99522f756034ac512a045447
Author: Carlos Soriano <csoriano gnome org>
Date: Fri Jul 24 22:10:49 2015 +0200
window-slot: plug memory leak
src/nautilus-window-slot.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index b836cdd..cbf801e 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -211,6 +211,7 @@ static void
check_empty_states (NautilusWindowSlot *slot)
{
GList *files;
+ GList *filtered;
NautilusDirectory *directory;
gboolean show_hidden_files;
@@ -221,14 +222,15 @@ check_empty_states (NautilusWindowSlot *slot)
files = nautilus_directory_get_file_list (directory);
show_hidden_files = g_settings_get_boolean (gtk_filechooser_preferences,
NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES);
- files = nautilus_file_list_filter_hidden (files, show_hidden_files);
- if (g_list_length (files) == 0) {
+ filtered = nautilus_file_list_filter_hidden (files, show_hidden_files);
+ if (g_list_length (filtered) == 0) {
if (NAUTILUS_IS_SEARCH_DIRECTORY (directory)) {
gtk_widget_show (slot->details->no_search_results_widget);
} else {
gtk_widget_show (slot->details->folder_is_empty_widget);
}
}
+ nautilus_file_list_unref (filtered);
nautilus_file_list_unref (files);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]