mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
set_self_oom_score_adj: corrected error handling
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -112,7 +112,7 @@ void set_self_oom_score_adj(main_server_st * s)
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (fd) {
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
}
|
||||
#endif
|
||||
@@ -181,4 +181,5 @@ void drop_privileges(main_server_st * s)
|
||||
mslog(s, NULL, LOG_ERR, "cannot enforce NPROC limit: %s\n",
|
||||
strerror(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user