diff options
Diffstat (limited to 'crypto/async/async.c')
-rw-r--r-- | crypto/async/async.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/async/async.c b/crypto/async/async.c index 84c5876852..a320d455b7 100644 --- a/crypto/async/async.c +++ b/crypto/async/async.c @@ -138,6 +138,10 @@ static void async_release_job(ASYNC_JOB *job) { async_pool *pool; pool = (async_pool *)CRYPTO_THREAD_get_local(&poolkey); + if (pool == NULL) { + ERR_raise(ERR_LIB_ASYNC, ERR_R_INTERNAL_ERROR); + return; + } OPENSSL_free(job->funcargs); job->funcargs = NULL; sk_ASYNC_JOB_push(pool->jobs, job); @@ -148,6 +152,10 @@ void async_start_func(void) ASYNC_JOB *job; async_ctx *ctx = async_get_ctx(); + if (ctx == NULL) { + ERR_raise(ERR_LIB_ASYNC, ERR_R_INTERNAL_ERROR); + return; + } while (1) { /* Run the job */ job = ctx->currjob; |