mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
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:
parent
2388015b10
commit
d63a00a649
1 changed files with 4 additions and 0 deletions
4
config.c
4
config.c
|
|
@ -3349,6 +3349,8 @@ UNITTEST
|
||||||
user_notifications_t nots = tll_init();
|
user_notifications_t nots = tll_init();
|
||||||
config_override_t overrides = 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);
|
bool ret = config_load(&original, "/dev/null", ¬s, &overrides, false, false);
|
||||||
xassert(ret);
|
xassert(ret);
|
||||||
|
|
||||||
|
|
@ -3360,6 +3362,8 @@ UNITTEST
|
||||||
config_free(clone);
|
config_free(clone);
|
||||||
free(clone);
|
free(clone);
|
||||||
|
|
||||||
|
fcft_fini();
|
||||||
|
|
||||||
tll_free(overrides);
|
tll_free(overrides);
|
||||||
tll_free(nots);
|
tll_free(nots);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue