]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
coverity: CID 1464987: USE AFTER FREE
authorPauli <paul.dale@oracle.com>
Sun, 28 Jun 2020 22:17:25 +0000 (08:17 +1000)
committerPauli <paul.dale@oracle.com>
Sun, 5 Jul 2020 03:20:09 +0000 (13:20 +1000)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12309)

providers/implementations/rands/drbg.c

index c2fa99b865c483bd3182960a791b0fe29fe3057c..3394271835f2cb87e3fdcfcac12a2dc9b29b2e31 100644 (file)
@@ -503,7 +503,7 @@ int PROV_DRBG_instantiate(PROV_DRBG *drbg, unsigned int strength,
                                                drbg->min_noncelen,
                                                drbg->max_noncelen)) {
                 PROVerr(0, PROV_R_ERROR_RETRIEVING_NONCE);
-                OPENSSL_free(nonce);
+                goto end;
             }
 #ifndef PROV_RAND_GET_RANDOM_NONCE
         } else if (drbg->parent != NULL) {