[glib] gio: fix memory leak in g_buffered_output_stream_write_async()



commit 275731e20039e763748608072e0e2a98b7d035ed
Author: Ravi Sankar Guntur <ravi g samsung com>
Date:   Tue Feb 14 22:05:33 2012 +0530

    gio: fix memory leak in g_buffered_output_stream_write_async()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670085
    
    Signed-off-by: Ravi Sankar Guntur <ravi g samsung com>

 gio/gbufferedoutputstream.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gio/gbufferedoutputstream.c b/gio/gbufferedoutputstream.c
index ffa8fbd..df8178e 100644
--- a/gio/gbufferedoutputstream.c
+++ b/gio/gbufferedoutputstream.c
@@ -635,12 +635,12 @@ g_buffered_output_stream_write_async (GOutputStream        *stream,
     {
       wdata->fdata.flush_stream = FALSE;
       wdata->fdata.close_stream = FALSE;
-      g_simple_async_result_run_in_thread (res, 
-                                           flush_buffer_thread, 
+      g_simple_async_result_run_in_thread (res,
+                                           flush_buffer_thread,
                                            io_priority,
                                            cancellable);
-      g_object_unref (res);
     }
+    g_object_unref (res);
 }
 
 static gssize



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