forked from mirrors/kore
Don't call close on an fd that is -1.
This commit is contained in:
parent
f7b0b7c7ac
commit
4a69657dce
|
@ -254,8 +254,11 @@ kore_domain_closelogs(void)
|
||||||
{
|
{
|
||||||
struct kore_domain *dom;
|
struct kore_domain *dom;
|
||||||
|
|
||||||
TAILQ_FOREACH(dom, &domains, list)
|
TAILQ_FOREACH(dom, &domains, list) {
|
||||||
close(dom->accesslog);
|
if (dom->accesslog != -1) {
|
||||||
|
(void)close(dom->accesslog);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue