[libgdata/libgdata-0-7] documents: Fix some memory leaks in the documents test suite



commit 8770a46d068fc134e3d2906667b7f733d9a2e6e8
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Dec 9 19:01:32 2010 +0000

    documents: Fix some memory leaks in the documents test suite

 gdata/tests/documents.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index dde7546..0913e57 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -48,6 +48,8 @@ test_authentication (void)
 	g_assert (gdata_service_is_authenticated (GDATA_SERVICE (service)) == TRUE);
 	g_assert_cmpstr (gdata_service_get_username (GDATA_SERVICE (service)), ==, DOCUMENTS_USERNAME);
 	g_assert_cmpstr (gdata_service_get_password (GDATA_SERVICE (service)), ==, PASSWORD);
+
+	g_object_unref (service);
 }
 
 static void
@@ -90,6 +92,7 @@ test_remove_all_documents_and_folders (gconstpointer service)
 		g_clear_error (&error);
 	}
 
+	g_object_unref (query);
 	g_object_unref (feed);
 }
 
@@ -111,6 +114,7 @@ test_query_all_documents_with_folder (gconstpointer service)
 
 	g_clear_error (&error);
 	g_object_unref (feed);
+	g_object_unref (query);
 }
 
 static void
@@ -798,9 +802,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
@@ -837,6 +842,7 @@ test_batch_async_cancellation (BatchAsyncData *data, gconstpointer service)
 	g_main_loop_run (main_loop);
 	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]