diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-02-10 05:00:21 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-02-10 05:00:21 -0500 |
commit | e9fb5af7cb3f6cffc3432813bba6238c88c46533 (patch) | |
tree | c15df91e756650bbc0847f6b8a8608d957cabe15 | |
parent | 655158fa7a28c5ba76f455d5f46c9ea8b94faf74 (diff) | |
download | libgit2-e9fb5af7cb3f6cffc3432813bba6238c88c46533.tar.gz |
openssl: retry initialization on failure
When we fail to initialize the OpenSSL subsystem, don't assume that
we're "initialized". Subsequent initialization requests -- if there are
any -- should replay initialization and fail again.
-rw-r--r-- | src/libgit2/streams/openssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libgit2/streams/openssl.c b/src/libgit2/streams/openssl.c index 89c96780c..5e0e2c939 100644 --- a/src/libgit2/streams/openssl.c +++ b/src/libgit2/streams/openssl.c @@ -198,7 +198,7 @@ static int openssl_ensure_initialized(void) if ((error = git_openssl_stream_dynamic_init()) == 0) error = openssl_init(); - openssl_initialized = true; + openssl_initialized = !error; } error |= git_mutex_unlock(&openssl_mutex); |