aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-26 18:15:36 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-06-26 18:15:36 +0000
commitd63a00a649c83d602b8914164251296c77029e3b (patch)
treebf6267eef350359e8f76c8ca3392c8bf949fecd3
parentsixel: assert upper pixel of last sixel maps to last image row, *or lower* (diff)
config: unittest: explicitly call fcft_init() + fcft_fini()
This plugs a memory leak, caused by fontconfig functions being called as part of the unit test implicitly allocating global objects.
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index 1d9f200b..aba85db3 100644
--- a/config.c
+++ b/config.c
@@ -3349,6 +3349,8 @@ UNITTEST
user_notifications_t nots = tll_init();
config_override_t overrides = tll_init();
+ fcft_init(FCFT_LOG_COLORIZE_NEVER, false, FCFT_LOG_CLASS_NONE);
+
bool ret = config_load(&original, "/dev/null", &nots, &overrides, false, false);
xassert(ret);
@@ -3360,6 +3362,8 @@ UNITTEST
config_free(clone);
free(clone);
+ fcft_fini();
+
tll_free(overrides);
tll_free(nots);
}