Skip to content
Snippets Groups Projects
Commit 3122a36b authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix failure handing in crypt initialization.

Don't add the atexit() do_cryptEnd() handler until we're not going
to call cryptEnd() ourselves.
parent e9d4c7d9
No related branches found
No related tags found
No related merge requests found
Pipeline #8659 failed
......@@ -309,7 +309,6 @@ static void internal_do_cryptInit(void)
if ((ret = cryptInit()) == CRYPT_OK) {
cryptAddRandom(NULL, CRYPT_RANDOM_SLOWPOLL);
atexit(do_cryptEnd);
cryptInit_error = CRYPT_OK;
}
else {
......@@ -349,6 +348,7 @@ static void internal_do_cryptInit(void)
cryptfail = NULL;
return;
}
atexit(do_cryptEnd);
cryptlib_initialized = true;
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment