Clean up context, even if an error occured.
[openssl.git] / crypto / pkcs7 / pk7_doit.c
index 80ac5e34b4c5351badb140ce60743a11c96a2b1a..4ab24a86f5190e3f66d29943034419c9838135d6 100644 (file)
@@ -699,6 +699,7 @@ int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
        if (i <= 0) 
                {
                PKCS7err(PKCS7_F_PKCS7_DATAVERIFY,ERR_R_X509_LIB);
+               X509_STORE_CTX_cleanup(ctx);
                goto err;
                }
        X509_STORE_CTX_cleanup(ctx);