mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-31 07:11:09 -04:00
main: free config if we fail to load the config
This commit is contained in:
parent
048edc58f1
commit
c993148635
1 changed files with 3 additions and 1 deletions
4
main.c
4
main.c
|
|
@ -273,8 +273,10 @@ main(int argc, char *const *argv)
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
struct config conf = {NULL};
|
struct config conf = {NULL};
|
||||||
if (!config_load(&conf, conf_path))
|
if (!config_load(&conf, conf_path)) {
|
||||||
|
config_free(conf);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
if (!locale_is_utf8()) {
|
if (!locale_is_utf8()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue