goutputstream: Fix missing call to clear_pending in flush_async

If flush_async is deleted by a child class, then calling
g_output_stream_flush_async would leave the GOutputStream in an invalid
state. I'm not aware of any GOutputStream that would be affected by this
issue, but might as well fix it.

https://bugzilla.gnome.org/show_bug.cgi?id=738277
This commit is contained in:
Michael Catanzaro 2018-02-12 17:57:35 -06:00
parent 5b88ed8caf
commit c3c7b52f91

View File

@ -1340,6 +1340,7 @@ g_output_stream_flush_async (GOutputStream *stream,
if (class->flush_async == NULL)
{
g_output_stream_clear_pending (stream);
g_task_return_boolean (task, TRUE);
g_object_unref (task);
return;