Coverity complains that some child_script_info field accesses are guarded
by the mutexes, while others are not; placate it by performing the assignment
before taking the lock.
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=
1665151
References: https://github.com/openssl/project/issues/1362
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28406)
if (!TEST_ptr(child_rt->debug_bio = BIO_new(BIO_s_mem())))
goto err;
- ossl_crypto_mutex_lock(child_rt->m);
-
child_rt->child_script_info = script_info;
+
+ ossl_crypto_mutex_lock(child_rt->m);
if (!TEST_ptr(child_rt->t = ossl_crypto_thread_native_start(RADIX_THREAD_worker_main,
child_rt, 1))) {
ossl_crypto_mutex_unlock(child_rt->m);