mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
ocsigaltstack: posix_memaligns does not return negative on failure
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -221,7 +221,7 @@ void ocsigaltstack(struct worker_st *ws)
|
||||
int e;
|
||||
|
||||
/* setup the stack for signal handlers */
|
||||
if (posix_memalign((void**)&ss.ss_sp, getpagesize(), SIGSTKSZ) < 0) {
|
||||
if (posix_memalign((void**)&ss.ss_sp, getpagesize(), SIGSTKSZ) != 0) {
|
||||
oclog(ws, LOG_ERR,
|
||||
"could not allocate memory for signal stack");
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user