Merge branch 'backport-4378-gio-tool-leaks-glib-2-82' into 'glib-2-82'

Backport !4378 “gio: Fix GFileEnumerator leaks in gio tools” to glib-2-82

See merge request GNOME/glib!4380
This commit is contained in:
Michael Catanzaro 2024-11-04 16:09:17 +00:00
commit 0fb140c035
3 changed files with 5 additions and 1 deletions

View File

@ -157,6 +157,8 @@ list (GFile *file)
res = FALSE;
}
g_object_unref (enumerator);
return res;
}

View File

@ -204,6 +204,8 @@ trash_list (GFile *file,
res = FALSE;
}
g_object_unref (enumerator);
return res;
}

View File

@ -106,7 +106,7 @@ do_tree (GFile *f, unsigned int level, guint64 pattern)
info_list = g_list_prepend (info_list, info);
}
}
g_file_enumerator_close (enumerator, NULL, NULL);
g_object_unref (enumerator);
info_list = g_list_sort (info_list, (GCompareFunc) sort_info_by_name);