Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15708)
worker();
- if (!TEST_true(wait_for_thread(thread1))
- || !TEST_true(wait_for_thread(thread2))
- || !TEST_true(multi_success))
- goto err;
-
testresult = 1;
+ /*
+ * Don't combine these into one if statement; must wait for both threads.
+ */
+ if (!TEST_true(wait_for_thread(thread1)))
+ testresult = 0;
+ if (!TEST_true(wait_for_thread(thread2)))
+ testresult = 0;
+ if (!TEST_true(multi_success))
+ testresult = 0;
err:
EVP_MD_free(sha256);