[nautilus] search-engine-recent: fix memory leak on short-name result



commit 284c5a8612bca9fe1badccf172982eeab808a2e1
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Oct 4 17:38:05 2018 +0200

    search-engine-recent: fix memory leak on short-name result
    
    RecentInfo short-name needs to be free'd

 src/nautilus-search-engine-recent.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c
index b851c0ae2..0de060f83 100644
--- a/src/nautilus-search-engine-recent.c
+++ b/src/nautilus-search-engine-recent.c
@@ -228,8 +228,8 @@ recent_thread_func (gpointer user_data)
 
         if (rank <= 0)
         {
-            name = gtk_recent_info_get_short_name (info);
-            rank = nautilus_query_matches_string (self->query, name);
+            g_autofree char *short_name = gtk_recent_info_get_short_name (info);
+            rank = nautilus_query_matches_string (self->query, short_name);
         }
 
         if (rank > 0)


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