ocsigaltstack: posix_memaligns does not return negative on failure

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2020-05-02 06:08:38 +02:00
parent 7d4190a0a3
commit 783c240998

View File

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