[gvfs] Fix more leaks of GSimpleAsyncResult



commit b29211e431511eac4b5f1084dddf0a9d818e95e6
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Mon Aug 22 17:22:22 2011 +0200

    Fix more leaks of GSimpleAsyncResult

 daemon/soup-input-stream.c  |    1 +
 daemon/soup-output-stream.c |    3 +++
 monitor/gdu/ggdudrive.c     |    4 +++-
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/daemon/soup-input-stream.c b/daemon/soup-input-stream.c
index e1928af..cb730a3 100644
--- a/daemon/soup-input-stream.c
+++ b/daemon/soup-input-stream.c
@@ -589,6 +589,7 @@ send_async_finished (GInputStream *stream)
       g_error_free (error);
     }
   g_simple_async_result_complete (result);
+  g_object_unref (result);
 }
 
 static void
diff --git a/daemon/soup-output-stream.c b/daemon/soup-output-stream.c
index 3c83440..885a8ca 100644
--- a/daemon/soup-output-stream.c
+++ b/daemon/soup-output-stream.c
@@ -321,6 +321,7 @@ soup_output_stream_write_async (GOutputStream       *stream,
     }
 
   g_simple_async_result_complete_in_idle (result);
+  g_object_unref (result);
 }
 
 static gssize
@@ -362,6 +363,7 @@ close_async_done (GOutputStream *stream)
   soup_output_stream_done_io (stream);
 
   g_simple_async_result_complete (result);
+  g_object_unref (result);
 }
 
 static void
@@ -398,6 +400,7 @@ soup_output_stream_close_async (GOutputStream        *stream,
       g_simple_async_result_set_from_error (result, error);
       g_error_free (error);
       g_simple_async_result_complete_in_idle (result);
+      g_object_unref (result);
       return;
     }
 
diff --git a/monitor/gdu/ggdudrive.c b/monitor/gdu/ggdudrive.c
index d6f6d58..4e51168 100644
--- a/monitor/gdu/ggdudrive.c
+++ b/monitor/gdu/ggdudrive.c
@@ -912,6 +912,7 @@ start_cb (GduDrive   *drive,
       g_free (assembled_drive_object_path);
     }
   g_simple_async_result_complete (simple);
+  g_object_unref (simple);
 }
 
 typedef struct
@@ -973,11 +974,12 @@ start_operation_reply (GMountOperation      *op,
       goto out;
     }
 
-  gdu_drive_activate (GDU_DRIVE (data->drive->presentable), start_cb, data->simple);
+  gdu_drive_activate (GDU_DRIVE (data->drive->presentable), start_cb, g_object_ref (data->simple));
 
  out:
   g_object_unref (data->drive);
   g_object_unref (data->start_operation);
+  g_object_unref (data->simple);
   g_free (data);
 }
 



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