[tracker/tracker-0.12] tests/libtracker-extract: Fix mem-leaks in the tests
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.12] tests/libtracker-extract: Fix mem-leaks in the tests
- Date: Thu, 22 Sep 2011 16:06:02 +0000 (UTC)
commit 0e3d78e0d5b241627aa7758e633fb8d91cb6529b
Author: Ivan Frade <ivan frade gmail com>
Date: Tue Sep 20 14:43:33 2011 +0300
tests/libtracker-extract: Fix mem-leaks in the tests
No memleaks in the tests help us to find memory leaks in the real code!
tests/libtracker-extract/tracker-test-xmp.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/tests/libtracker-extract/tracker-test-xmp.c b/tests/libtracker-extract/tracker-test-xmp.c
index 1190cc8..3ebcfb5 100644
--- a/tests/libtracker-extract/tracker-test-xmp.c
+++ b/tests/libtracker-extract/tracker-test-xmp.c
@@ -303,6 +303,11 @@ test_xmp_apply (void)
*/
/* g_assert_cmpint (tracker_sparql_builder_get_length (metadata), ==, 50); */
+ g_string_free (where, TRUE);
+ g_object_unref (metadata);
+ g_object_unref (preupdate);
+
+ tracker_xmp_free (data);
}
static void
@@ -389,6 +394,8 @@ test_xmp_regions (void)
g_free (filepath);
data = tracker_xmp_new (contents, size, "test://file");
+
+ g_free (contents);
g_assert_cmpint (2, ==, g_slist_length (data->regions));
@@ -435,6 +442,8 @@ test_xmp_regions_quill (void)
data = tracker_xmp_new (contents, size, "test://file");
+ g_free (contents);
+
g_assert_cmpint (2, ==, g_slist_length (data->regions));
region = g_slist_nth_data (data->regions, 1);
@@ -481,6 +490,8 @@ test_xmp_regions_ns_prefix (void)
data = tracker_xmp_new (contents, size, "test://file");
+ g_free (contents);
+
g_assert_cmpint (2, ==, g_slist_length (data->regions));
region = g_slist_nth_data (data->regions, 1);
@@ -524,6 +535,8 @@ test_xmp_regions_nb282393 ()
data = tracker_xmp_new (contents, size, "test://file");
+ g_free (contents);
+
g_assert_cmpint (1, ==, g_slist_length (data->regions));
/* Regions are stacked while parsing.*/
@@ -558,6 +571,8 @@ test_xmp_regions_nb282393_2 ()
data = tracker_xmp_new (contents, size, "test://file");
+ g_free (contents);
+
g_assert_cmpint (1, ==, g_slist_length (data->regions));
/* Regions are stacked while parsing.*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]