config: close FD if it is *valid*, not when it is *invalid*

This commit is contained in:
Daniel Eklöf 2020-08-27 21:11:03 +02:00
parent a24109a5e3
commit 6f114f639a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1849,7 +1849,7 @@ out:
tll_push_back(conf->fonts, config_font_parse("monospace"));
free(conf_file.path);
if (conf_file.fd < 0)
if (conf_file.fd >= 0)
close(conf_file.fd);
return ret;