test: Fix memory leak of asynctest
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Tue, 28 Sep 2021 15:23:44 +0000 (23:23 +0800)
committerHugo Landau <hlandau@openssl.org>
Fri, 23 Sep 2022 13:30:09 +0000 (14:30 +0100)
commitc5d061290baa9466182b6d1a5b88aa9e5a4b2386
tree2b5d68c4aab12be6f879c69d7542ff524ee0fe31
parentc6be0aa8ac3c172ad998ce33f392143312bfe760
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)
test/asynctest.c