Thread: Avoid a NULL dereference after failed initialisation.
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10493)
This commit is contained in:
parent
acc7b9fb5c
commit
3478a2102e
1 changed files with 2 additions and 0 deletions
|
@ -380,6 +380,8 @@ static int init_thread_deregister(void *index, int all)
|
|||
int i;
|
||||
|
||||
gtr = get_global_tevent_register();
|
||||
if (gtr == NULL)
|
||||
return 0;
|
||||
if (!all)
|
||||
CRYPTO_THREAD_write_lock(gtr->lock);
|
||||
for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue