[libgdata] tests: Fix memory leaks in the general test suite
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] tests: Fix memory leaks in the general test suite
- Date: Fri, 10 Dec 2010 17:53:24 +0000 (UTC)
commit 4f8564081500373ef15e0d15c4f35f1e498bb53e
Author: Philip Withnall <philip tecnocode co uk>
Date: Fri Dec 10 11:44:22 2010 +0000
tests: Fix memory leaks in the general test suite
gdata/tests/general.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdata/tests/general.c b/gdata/tests/general.c
index a1f98cf..ad7f662 100644
--- a/gdata/tests/general.c
+++ b/gdata/tests/general.c
@@ -74,6 +74,7 @@ test_entry_get_xml (void)
"<title type='text'>Testing title & escaping</title>"
"<content type='text/plain' src='http://bar.com/'/>"
"</entry>");
+ g_free (xml);
/* Reset the content */
gdata_entry_set_content (entry, "This is some sample content testing, amongst other things, <markup> & odd charactersâ?½");
@@ -194,7 +195,6 @@ test_entry_get_xml (void)
author = GDATA_AUTHOR (list->data);
g_assert (author != NULL);
- author = gdata_author_new ("F. BarrØ?", NULL, NULL);
g_assert_cmpstr (gdata_author_get_name (author), ==, "F. BarrØ?");
g_assert (gdata_author_get_uri (author) == NULL);
g_assert (gdata_author_get_email_address (author) == NULL);
@@ -323,6 +323,7 @@ test_entry_parse_xml (void)
"<ns:barfoo shizzle=\"zing\" fo=\"shizzle\">How about some charactersâ?½</ns:barfoo>"
"</entry>");
g_free (xml);
+ g_object_unref (entry);
}
static void
@@ -881,6 +882,8 @@ test_comparable (void)
g_assert_cmpint (gdata_comparable_compare (NULL, category), ==, -1);
g_assert_cmpint (gdata_comparable_compare (NULL, NULL), ==, 0);
g_assert_cmpint (gdata_comparable_compare (category, category), ==, 0);
+
+ g_object_unref (category);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]