[nautilus] search-engine-simple: don't leak DateRange array if not matching
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] search-engine-simple: don't leak DateRange array if not matching
- Date: Thu, 1 Mar 2018 07:48:59 +0000 (UTC)
commit 37c1cb51ce7c74e05e802fef4c75f310a0fa4316
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Mar 1 07:54:54 2018 +0100
search-engine-simple: don't leak DateRange array if not matching
src/nautilus-search-engine-simple.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-search-engine-simple.c b/src/nautilus-search-engine-simple.c
index 0ae787689..6752d653f 100644
--- a/src/nautilus-search-engine-simple.c
+++ b/src/nautilus-search-engine-simple.c
@@ -220,7 +220,6 @@ visit_directory (GFile *dir,
gboolean visited;
guint64 atime;
guint64 mtime;
- GPtrArray *date_range;
GDateTime *initial_date;
GDateTime *end_date;
NautilusTagManager *tag_manager;
@@ -243,6 +242,8 @@ visit_directory (GFile *dir,
while ((info = g_file_enumerator_next_file (enumerator, data->cancellable, NULL)) != NULL)
{
+ g_autoptr (GPtrArray) date_range = NULL;
+
display_name = g_file_info_get_display_name (info);
if (display_name == NULL)
{
@@ -298,7 +299,6 @@ visit_directory (GFile *dir,
found = nautilus_file_date_in_between (current_file_time,
initial_date,
end_date);
- g_ptr_array_unref (date_range);
}
if (nautilus_query_get_search_starred (data->query))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]