[glib] goutputstream: Fix missing call to clear_pending in flush_async



commit c3c7b52f91ebac5a070fd870b1d5a0b4a5a84f25
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Feb 12 17:57:35 2018 -0600

    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

 gio/goutputstream.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index d72660a4d..3e658e88a 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]