Fix missing malloc return value checks
[openssl.git] / crypto / pkcs7 / pk7_doit.c
index 83f3b77b298cfc8184aa035749fbccb017d05f1c..946aaa65435b33c9710cbf4292c194cf0f5469e6 100644 (file)
@@ -656,6 +656,8 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
             bio = BIO_new_mem_buf(data_body->data, data_body->length);
         else {
             bio = BIO_new(BIO_s_mem());
+            if (bio == NULL)
+                goto err;
             BIO_set_mem_eof_return(bio, 0);
         }
         if (bio == NULL)