mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-09 08:16:58 +08:00
Merge branch 'tmp-sigaltstack_RESOURCE_LEAK' into 'master'
Silence coverity See merge request openconnect/ocserv!446
This commit is contained in:
@@ -237,6 +237,7 @@ void ocsigaltstack(struct worker_st *ws)
|
||||
}
|
||||
if (mprotect(ss.ss_sp, SIGSTKSZ, PROT_READ | PROT_WRITE) == -1) {
|
||||
e = errno;
|
||||
free(ss.ss_sp);
|
||||
oclog(ws, LOG_ERR, "mprotect: %s\n", strerror(e));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@@ -244,6 +245,7 @@ void ocsigaltstack(struct worker_st *ws)
|
||||
ss.ss_flags = 0;
|
||||
if (sigaltstack(&ss, NULL) == -1) {
|
||||
e = errno;
|
||||
free(ss.ss_sp);
|
||||
oclog(ws, LOG_ERR, "sigaltstack: %s\n", strerror(e));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user