[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 95/116] tests/libtracker-miner: Fix memory leaks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/shuffle-libtracker-miner: 95/116] tests/libtracker-miner: Fix memory leaks
- Date: Thu, 12 Dec 2019 10:28:53 +0000 (UTC)
commit dea3040de3eb6d45be3a4b46f7b9e14d2052220f
Author: Andrea Azzarone <andrea azzarone canonical com>
Date: Wed Jan 23 19:33:49 2019 +0000
tests/libtracker-miner: Fix memory leaks
tests/libtracker-miner/tracker-priority-queue-test.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/tests/libtracker-miner/tracker-priority-queue-test.c
b/tests/libtracker-miner/tracker-priority-queue-test.c
index a32d0fb81..893ca14f9 100644
--- a/tests/libtracker-miner/tracker-priority-queue-test.c
+++ b/tests/libtracker-miner/tracker-priority-queue-test.c
@@ -130,6 +130,11 @@ test_priority_queue_find (void)
g_assert_cmpstr (result, !=, NULL);
g_assert_cmpint (priority, ==, 10);
+ while (!tracker_priority_queue_is_empty (queue)) {
+ gchar *text = (gchar *) tracker_priority_queue_pop (queue, NULL);
+ g_free (text);
+ }
+
tracker_priority_queue_unref (queue);
}
@@ -157,6 +162,11 @@ test_priority_queue_foreach (void)
g_assert_cmpint (counter, ==, 3);
+ while (!tracker_priority_queue_is_empty (queue)) {
+ gchar *text = (gchar *) tracker_priority_queue_pop (queue, NULL);
+ g_free (text);
+ }
+
tracker_priority_queue_unref (queue);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]