coverity 1462562 Dereference before null check

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)
This commit is contained in:
Pauli 2020-04-27 08:58:59 +10:00
parent 70e18f9dce
commit 437e36aed5
1 changed files with 2 additions and 4 deletions

View File

@ -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;
}