diff options
Diffstat (limited to 'crypto/async/async.c')
-rw-r--r-- | crypto/async/async.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/async/async.c b/crypto/async/async.c index 2a51ee7bc2..53b25d7b4b 100644 --- a/crypto/async/async.c +++ b/crypto/async/async.c @@ -181,7 +181,7 @@ int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret, if (ctx == NULL) return ASYNC_ERR; - if (*job) + if (*job != NULL) ctx->currjob = *job; for (;;) { @@ -203,7 +203,10 @@ int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret, } if (ctx->currjob->status == ASYNC_JOB_PAUSED) { + if (*job == NULL) + return ASYNC_ERR; ctx->currjob = *job; + /* * Restore the default libctx to what it was the last time the * fibre ran |