bookmarklist: Avoid an invalid read

This shows up when running the objects-finalize
test under valgrind.
This commit is contained in:
Matthias Clasen
2021-03-27 16:48:30 -04:00
parent e7f9d56da5
commit 97a9e23b85

View File

@@ -287,8 +287,15 @@ got_file_info (GObject *source,
GtkBookmarkList *self = user_data;
GFile *file = G_FILE (source);
GFileInfo *info;
GError *error = NULL;
info = g_file_query_info_finish (file, res, &error);
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
{
g_error_free (error);
return;
}
info = g_file_query_info_finish (file, res, NULL);
if (info)
{
char *uri;