free cleanup almost the finale
[openssl.git] / apps / dgst.c
index 3ff47501bd9063850dde085188568e6ab4924588..69211d34aca1bf16e9075d7c49eef699bd2c6145 100644 (file)
@@ -441,10 +441,7 @@ int dgst_main(int argc, char **argv)
         }
     }
  end:
-    if (buf != NULL) {
-        OPENSSL_cleanse(buf, BUFSIZE);
-        OPENSSL_free(buf);
-    }
+    OPENSSL_clear_free(buf, BUFSIZE);
     BIO_free(in);
     if (passin)
         OPENSSL_free(passin);