rand: don't free an mis-set pointer on error
authorPauli <pauli@openssl.org>
Mon, 20 Sep 2021 23:19:35 +0000 (09:19 +1000)
committerPauli <pauli@openssl.org>
Wed, 22 Sep 2021 08:01:12 +0000 (18:01 +1000)
commitcaf569a5b3271c2860732ee44509f3825a179fd5
treebd6cd31d5cbb025fb7620bec40c29cc4fd90a95d
parent57cd10dd1ee9659b94cfa8a8e74c5a151632975e
rand: don't free an mis-set pointer on error

This is adding robustness to the code.  The fix to not mis-set the pointer
is in #16636.

Fixes #16631

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/16640)
providers/implementations/rands/drbg.c