test: Fix memory leak of asynctest
ASYNC_init_thread() will be called automatically by ASYNC_start_job(), so ASYNC_cleanup_thread() must be called at last, otherwise it will cause memory leak. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16703)
This commit is contained in:
parent
c6be0aa8ac
commit
c5d061290b
@ -411,6 +411,7 @@ static int test_ASYNC_start_job_ex(void)
|
|||||||
ret = 1;
|
ret = 1;
|
||||||
err:
|
err:
|
||||||
ASYNC_WAIT_CTX_free(waitctx);
|
ASYNC_WAIT_CTX_free(waitctx);
|
||||||
|
ASYNC_cleanup_thread();
|
||||||
OSSL_LIB_CTX_free(libctx);
|
OSSL_LIB_CTX_free(libctx);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user