Merge branch 'cm/fix-updateiconcache-path-leak' into 'gtk-3-24'

updateiconcache: Fix path leak in scan_directory

See merge request GNOME/gtk!7915
This commit is contained in:
Matthias Clasen
2025-02-21 16:56:51 +00:00

View File

@ -612,7 +612,10 @@ scan_directory (const gchar *base_path,
dir = g_dir_open (dir_path, 0, NULL);
if (!dir)
return directories;
{
g_free (dir_path);
return directories;
}
dir_hash = g_hash_table_new (g_str_hash, g_str_equal);
@ -710,6 +713,7 @@ scan_directory (const gchar *base_path,
g_list_free_full (list, g_free);
g_dir_close (dir);
g_free (dir_path);
/* Move dir into the big file hash */
g_hash_table_foreach_remove (dir_hash, foreach_remove_func, files);