Fix a RUN_ONCE bug
authorMatt Caswell <matt@openssl.org>
Tue, 20 Nov 2018 15:32:55 +0000 (15:32 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 4 Jan 2019 20:23:16 +0000 (20:23 +0000)
commitf725fe5b4b6504df08e30f5194d321c3025e2336
tree269f79d1ce29c277b5877a36c70cbaba62fc7bf7
parentd6399c85b62e8300ae19cdc243d0b6a2696724bb
Fix a RUN_ONCE bug

We have a number of instances where there are multiple "init" functions for
a single CRYPTO_ONCE variable, e.g. to load config automatically or to not
load config automatically. Unfortunately the RUN_ONCE mechanism was not
correctly giving the right return value where an alternative init function
was being used.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7983)
crypto/init.c
include/internal/thread_once.h
ssl/ssl_init.c