fix memory leak (BIO_free_all needs pointer to first BIO)
[openssl.git] / crypto / pkcs7 / pk7_smime.c
index 4607e5fd6990f8d2a01b3c49f21c766d8a2e6fd1..d37be48239928b599b6ded6f49c84f6008e57583 100644 (file)
@@ -300,11 +300,9 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
        
        if (tmpin == indata)
                {
-               if(indata) BIO_pop(p7bio);
-               BIO_free_all(p7bio);
+               if (indata) BIO_pop(p7bio);
                }
-       else
-               BIO_free_all(tmpin);
+       BIO_free_all(p7bio);
 
        sk_X509_free(signers);