Merge branch 'tmp-sigaltstack_RESOURCE_LEAK' into 'master'

Silence coverity

See merge request openconnect/ocserv!446
This commit is contained in:
Dimitri Papadopoulos Orfanos
2025-12-06 11:09:29 +01:00

View File

@@ -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);
}