diff options
author | Sverker Eriksson <[email protected]> | 2018-05-17 18:46:41 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-05-17 18:46:41 +0200 |
commit | 4b8a81dd49fbeda8f2da118d43f3690a61f2283a (patch) | |
tree | db8fd41d748f1b0622cf2ab3b65bd3a2b439e1f3 /lib/crypto/c_src | |
parent | 44b09e036b31b29dddc3b178e8f6b9fc96a9a874 (diff) | |
download | otp-4b8a81dd49fbeda8f2da118d43f3690a61f2283a.tar.gz otp-4b8a81dd49fbeda8f2da118d43f3690a61f2283a.tar.bz2 otp-4b8a81dd49fbeda8f2da118d43f3690a61f2283a.zip |
crypto: Fix upgrade bug when engine support is missing
library_refc was not checked causing crash
when init_digest_types() was called a second time.
Diffstat (limited to 'lib/crypto/c_src')
-rw-r--r-- | lib/crypto/c_src/crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 6957d25774..9e7e1e81ae 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -989,6 +989,7 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) PRINTF_ERR0("CRYPTO: Could not open resource type 'ENGINE_CTX'"); return __LINE__; } +#endif if (library_refc > 0) { /* Repeated loading of this library (module upgrade). @@ -996,7 +997,6 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info) */ return 0; } -#endif atom_true = enif_make_atom(env,"true"); atom_false = enif_make_atom(env,"false"); |