From 437e36aed578f0a3213cc87b34abecb36bf1bde5 Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 27 Apr 2020 08:58:59 +1000 Subject: [PATCH] coverity 1462562 Dereference before null check Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11651) --- test/drbg_extra_test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/drbg_extra_test.c b/test/drbg_extra_test.c index 8d7b8fbf8f..e7c0d77d7f 100644 --- a/test/drbg_extra_test.c +++ b/test/drbg_extra_test.c @@ -75,10 +75,8 @@ static int run_extra_kat(const struct drbg_extra_kat *td) failures++; err: - if (drbg != NULL) { - RAND_DRBG_uninstantiate(drbg); - RAND_DRBG_free(drbg); - } + RAND_DRBG_uninstantiate(drbg); + RAND_DRBG_free(drbg); return failures == 0; } -- 2.25.1