[nautilus/wip/antoniof/meets-valgrind: 11/11] list-view: Don't leak container array




commit 24108224752313ff5eae0b550e58f2e066018f67
Author: António Fernandes <antoniof gnome org>
Date:   Sat Dec 19 15:11:43 2020 +0000

    list-view: Don't leak container array
    
    When converting the array into a list, the list takes the data. But the
    original container is leaked. Free it.
    
    Found in valgrind file provided by nekohayo.

 src/nautilus-list-view.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index a4fabb924..d934a76de 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -2479,6 +2479,8 @@ default_column_array_as_list (gchar **array)
         i++;
     }
 
+    g_free (array);
+
     return res;
 }
 


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