free cleanup almost the finale
[openssl.git] / crypto / rand / rand_lib.c
index 0bbaf675e27494caff9eb9f9ce9a97fe8862e7a7..acc116b9a7a419c752106da9be38a41edeb06565 100644 (file)
@@ -207,10 +207,7 @@ static size_t drbg_get_entropy(DRBG_CTX *ctx, unsigned char **pout,
 
 static void drbg_free_entropy(DRBG_CTX *ctx, unsigned char *out, size_t olen)
 {
-    if (out) {
-        OPENSSL_cleanse(out, olen);
-        OPENSSL_free(out);
-    }
+    OPENSSL_clear_free(out, olen);
 }
 
 /*