Cleanse memory using the new OPENSSL_cleanse() function.
[oweals/openssl.git] / crypto / pkcs7 / bio_ber.c
index 42331f7ab0ea4f7c415809f545b50c820f053c52..895a91177be828eb8d0875044e34b44041a95963 100644 (file)
@@ -145,7 +145,7 @@ static int ber_free(BIO *a)
 
        if (a == NULL) return(0);
        b=(BIO_BER_CTX *)a->ptr;
-       memset(a->ptr,0,sizeof(BIO_BER_CTX));
+       OPENSSL_cleanse(a->ptr,sizeof(BIO_BER_CTX));
        OPENSSL_free(a->ptr);
        a->ptr=NULL;
        a->init=0;