mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Merge branch 'tmp-coverity-fixes' into 'master'
Include fixes identified by coverity See merge request openconnect/ocserv!260
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ int ctl_handler_init(main_server_st * s)
|
||||
e = errno;
|
||||
mslog(s, NULL, LOG_ERR, "could not bind socket '%s': %s",
|
||||
GETPCONFIG(s)->occtl_socket_file, strerror(e));
|
||||
close(sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -162,6 +163,7 @@ int ctl_handler_init(main_server_st * s)
|
||||
e = errno;
|
||||
mslog(s, NULL, LOG_ERR, "could not listen to socket '%s': %s",
|
||||
GETPCONFIG(s)->occtl_socket_file, strerror(e));
|
||||
close(sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -733,7 +733,7 @@ void session_list(struct unix_ctx *ctx, SecmListCookiesReplyMsg *rep, FILE *out,
|
||||
{
|
||||
unsigned i;
|
||||
const char *username;
|
||||
char tmpbuf[MAX_TMPSTR_SIZE];
|
||||
char tmpbuf[MAX_TMPSTR_SIZE] = "";
|
||||
time_t t;
|
||||
struct tm *tm, _tm;
|
||||
char str_since[65];
|
||||
|
||||
Reference in New Issue
Block a user