From d63a00a649c83d602b8914164251296c77029e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 26 Jun 2023 20:15:36 +0200 Subject: [PATCH] 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. --- config.c | 4 ++++ 1 file changed, 4 insertions(+) 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", ¬s, &overrides, false, false); xassert(ret); @@ -3360,6 +3362,8 @@ UNITTEST config_free(clone); free(clone); + fcft_fini(); + tll_free(overrides); tll_free(nots); }