[libgdata] calendar: Fix memory leaks in the calendar test suite
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] calendar: Fix memory leaks in the calendar test suite
- Date: Fri, 10 Dec 2010 17:52:58 +0000 (UTC)
commit c2703d63f24a77b5dfd440a69b91932c63c00199
Author: Philip Withnall <philip tecnocode co uk>
Date: Fri Dec 10 10:46:29 2010 +0000
calendar: Fix memory leaks in the calendar test suite
gdata/tests/calendar.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gdata/tests/calendar.c b/gdata/tests/calendar.c
index ff5455b..ffd60f4 100644
--- a/gdata/tests/calendar.c
+++ b/gdata/tests/calendar.c
@@ -72,6 +72,8 @@ test_authentication (void)
g_assert (gdata_service_is_authenticated (service) == TRUE);
g_assert_cmpstr (gdata_service_get_username (service), ==, USERNAME);
g_assert_cmpstr (gdata_service_get_password (service), ==, PASSWORD);
+
+ g_object_unref (service);
}
static void
@@ -437,6 +439,8 @@ test_xml_recurrence (void)
g_assert_cmpstr (id, ==, "g5928e82rrch95b25f8ud0dlsg");
g_assert_cmpstr (uri, ==, "http://www.google.com/calendar/feeds/libgdata test googlemail com/private/full/g5928e82rrch95b25f8ud0dlsg");
+ g_free (id);
+ g_free (uri);
g_object_unref (event);
}
@@ -688,6 +692,7 @@ test_acls_insert_rule (gconstpointer service)
g_object_unref (rule);
g_object_unref (new_rule);
+ g_object_unref (calendar);
}
static void
@@ -785,6 +790,7 @@ test_acls_delete_rule (gconstpointer service)
g_clear_error (&error);
g_object_unref (rule);
+ g_object_unref (calendar);
}
static void
@@ -895,6 +901,7 @@ test_batch (gconstpointer service)
g_clear_error (&error);
g_object_unref (operation);
g_object_unref (inserted_entry3);
+ g_object_unref (calendar);
}
typedef struct {
@@ -946,9 +953,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
@@ -990,6 +998,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]