mirror of
https://github.com/openssl/openssl.git
synced 2025-04-12 20:30:52 +08:00
Fix coverity CID #1454815 - NULL ptr dereference in initthread.c
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/12708)
This commit is contained in:
parent
5340c8ea2a
commit
59ed733989
@ -392,13 +392,14 @@ static int init_thread_deregister(void *index, int all)
|
||||
for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
|
||||
THREAD_EVENT_HANDLER **hands
|
||||
= sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
|
||||
THREAD_EVENT_HANDLER *curr = *hands, *prev = NULL, *tmp;
|
||||
THREAD_EVENT_HANDLER *curr = NULL, *prev = NULL, *tmp;
|
||||
|
||||
if (hands == NULL) {
|
||||
if (!all)
|
||||
CRYPTO_THREAD_unlock(gtr->lock);
|
||||
return 0;
|
||||
}
|
||||
curr = *hands;
|
||||
while (curr != NULL) {
|
||||
if (all || curr->index == index) {
|
||||
if (prev != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user