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.
This commit is contained in:
Daniel Eklöf 2023-06-26 20:15:36 +02:00
parent 2388015b10
commit d63a00a649
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);
}