test/threadstest.c: Add checks for CRYPTO_THREAD_lock_new()
authorJiasheng Jiang <jiasheng@purdue.edu>
Wed, 1 May 2024 20:03:13 +0000 (20:03 +0000)
committerTomas Mraz <tomas@openssl.org>
Mon, 6 May 2024 08:24:22 +0000 (10:24 +0200)
commit327261c076b8468382e1effea14d79446cc22b4d
treec549fe00018da403cab17673050b99e259b6cc78
parent51fd52b8a791528971ca13aa4db94e5d50804b29
test/threadstest.c: Add checks for CRYPTO_THREAD_lock_new()

Add checks for the return value of CRYPTO_THREAD_lock_new() in order to avoid Null pointer dereference.

Fixes: 5f8b812931 ("Add locking to atomic operations in rw/rcu tests")
Fixes: d0e1a0ae70 ("RCU lock implementation")
Fixes: 71a04cfca0 ("Implement new multi-threading API")
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24313)
test/threadstest.c