Commit bcb5d421 authored by Richard Levitte's avatar Richard Levitte
Browse files

OPENSSL_LH_flush(): assign NULL after freeing



OPENSSL_LH_flush() frees the linked lists for each slot, but didn't
set the list head to NULL after doing so, with the result that an
operation that affects these lists is likely to cause a crash.

Reviewed-by: default avatarPaul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8781)
parent e019da7b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ void OPENSSL_LH_flush(OPENSSL_LHASH *lh)
            OPENSSL_free(n);
            n = nn;
        }
        lh->b[i] = NULL;
    }
}