aboutsummaryrefslogtreecommitdiffstats
path: root/lv2
diff options
context:
space:
mode:
Diffstat (limited to 'lv2')
-rw-r--r--lv2/atom/atom-test-utils.c10
-rw-r--r--lv2/atom/atom-test.c2
-rw-r--r--lv2/atom/forge-overflow-test.c6
3 files changed, 17 insertions, 1 deletions
diff --git a/lv2/atom/atom-test-utils.c b/lv2/atom/atom-test-utils.c
index 889c091..057dada 100644
--- a/lv2/atom/atom-test-utils.c
+++ b/lv2/atom/atom-test-utils.c
@@ -49,6 +49,16 @@ urid_map(LV2_URID_Map_Handle handle, const char* uri)
return n_uris;
}
+static void
+free_urid_map(void)
+{
+ for (uint32_t i = 0; i < n_uris; ++i) {
+ free(uris[i]);
+ }
+
+ free(uris);
+}
+
static int
test_fail(const char* fmt, ...)
{
diff --git a/lv2/atom/atom-test.c b/lv2/atom/atom-test.c
index 3b902d8..5189d9d 100644
--- a/lv2/atom/atom-test.c
+++ b/lv2/atom/atom-test.c
@@ -357,5 +357,7 @@ main(void)
0);
}
+ free_urid_map();
+
return 0;
}
diff --git a/lv2/atom/forge-overflow-test.c b/lv2/atom/forge-overflow-test.c
index b9beacc..353ad79 100644
--- a/lv2/atom/forge-overflow-test.c
+++ b/lv2/atom/forge-overflow-test.c
@@ -106,5 +106,9 @@ test_literal_overflow(void)
int
main(void)
{
- return test_string_overflow() || test_literal_overflow();
+ const int ret = test_string_overflow() || test_literal_overflow();
+
+ free_urid_map();
+
+ return ret;
}