gfileenumerator: fix leak in error path

Found by Coverity.
This commit is contained in:
Michael Catanzaro 2021-04-01 14:13:19 -05:00
parent 719484a575
commit 8bfc299813

View File

@ -787,7 +787,10 @@ next_files_thread (GTask *task,
} }
if (error) if (error)
g_task_return_error (task, error); {
g_list_free_full (files, g_object_unref);
g_task_return_error (task, error);
}
else else
g_task_return_pointer (task, files, (GDestroyNotify)next_async_op_free); g_task_return_pointer (task, files, (GDestroyNotify)next_async_op_free);
} }