[evolution-data-server] Bug 771289 - Memory leaks in test-contact-types.c
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 771289 - Memory leaks in test-contact-types.c
- Date: Fri, 20 Jan 2017 14:03:16 +0000 (UTC)
commit 3d136bd5a8ab26e6465927a0c2685d0a827e02a7
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 20 15:03:36 2017 +0100
Bug 771289 - Memory leaks in test-contact-types.c
tests/libebook-contacts/test-contact-types.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/tests/libebook-contacts/test-contact-types.c b/tests/libebook-contacts/test-contact-types.c
index fd12429..960addb 100644
--- a/tests/libebook-contacts/test-contact-types.c
+++ b/tests/libebook-contacts/test-contact-types.c
@@ -182,7 +182,10 @@ test_photo (TypesFixture *fixture,
g_assert_cmpint (new_photo->data.inlined.length, ==, photo->data.inlined.length);
if (memcmp (new_photo->data.inlined.data, photo->data.inlined.data, photo->data.inlined.length))
- g_error ("photo data differs");
+ g_error ("photo data differs");
+
+ e_contact_photo_free (photo);
+ e_contact_photo_free (new_photo);
}
/************* CATEGORIES *****************/
@@ -214,6 +217,9 @@ test_categories_convert_to_string (TypesFixture *fixture,
/* Test conversion of list to string */
g_assert_cmpstr (categories, ==, "Birthday,Business,Competition");
+
+ g_list_free (category_list);
+ g_free (categories);
}
static void
@@ -231,6 +237,8 @@ test_categories_convert_to_list (TypesFixture *fixture,
g_assert_cmpstr ((gchar *) g_list_nth_data (category_list, 0), ==, "Birthday");
g_assert_cmpstr ((gchar *) g_list_nth_data (category_list, 1), ==, "Business");
g_assert_cmpstr ((gchar *) g_list_nth_data (category_list, 2), ==, "Competition");
+
+ g_list_free_full (category_list, g_free);
}
gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]