mirror of https://github.com/openssl/openssl.git
async_posix: raise a memory allocation error if we fail to allocate stack memory
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17762)
This commit is contained in:
parent
96a7766172
commit
83c48d96ff
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
|
# include <openssl/err.h>
|
||||||
|
|
||||||
#define STACKSIZE 32768
|
#define STACKSIZE 32768
|
||||||
|
|
||||||
|
@ -45,6 +46,7 @@ int async_fibre_makecontext(async_fibre *fibre)
|
||||||
makecontext(&fibre->fibre, async_start_func, 0);
|
makecontext(&fibre->fibre, async_start_func, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
ERR_raise(ERR_LIB_ASYNC, ERR_R_MALLOC_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
fibre->fibre.uc_stack.ss_sp = NULL;
|
fibre->fibre.uc_stack.ss_sp = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue