diff options
| author | Milan Crha <mcrha@redhat.com> | 2017-01-20 15:03:36 +0100 |
|---|---|---|
| committer | Milan Crha <mcrha@redhat.com> | 2017-01-20 15:03:36 +0100 |
| commit | 3d136bd5a8ab26e6465927a0c2685d0a827e02a7 (patch) | |
| tree | f0a94c4326c640087870c41bca708e46146092e5 /tests/libebook-contacts | |
| parent | a268ea96d534bdd201147808fada96b1ac67b617 (diff) | |
| download | evolution-data-server-3d136bd5a8ab26e6465927a0c2685d0a827e02a7.tar.gz | |
Bug 771289 - Memory leaks in test-contact-types.c
Diffstat (limited to 'tests/libebook-contacts')
| -rw-r--r-- | 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 fd12429c4..960addbb9 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 |
