[libgdata] contacts: Fix memory leaks in the contacts test suite



commit 205874013f1d29df289f5ddc0ac019f11d207521
Author: Philip Withnall <philip tecnocode co uk>
Date:   Fri Dec 10 11:18:49 2010 +0000

    contacts: Fix memory leaks in the contacts test suite

 gdata/tests/contacts.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdata/tests/contacts.c b/gdata/tests/contacts.c
index 3fcff87..7c14106 100644
--- a/gdata/tests/contacts.c
+++ b/gdata/tests/contacts.c
@@ -1791,9 +1791,10 @@ test_batch_async (BatchAsyncData *data, gconstpointer service)
 	main_loop = g_main_loop_new (NULL, TRUE);
 
 	gdata_batch_operation_run_async (operation, NULL, (GAsyncReadyCallback) test_batch_async_cb, main_loop);
-
 	g_main_loop_run (main_loop);
+
 	g_main_loop_unref (main_loop);
+	g_object_unref (operation);
 }
 
 static void
@@ -1838,6 +1839,7 @@ test_batch_async_cancellation (BatchAsyncData *data, gconstpointer service)
 
 	g_main_loop_unref (main_loop);
 	g_object_unref (cancellable);
+	g_object_unref (operation);
 }
 
 static void



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