coverity 1462562 Dereference before null check
authorPauli <paul.dale@oracle.com>
Sun, 26 Apr 2020 22:58:59 +0000 (08:58 +1000)
committerPauli <paul.dale@oracle.com>
Thu, 30 Apr 2020 10:21:32 +0000 (20:21 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)

test/drbg_extra_test.c

index 8d7b8fb..e7c0d77 100644 (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;
 }