diff options
author | Rich Salz <rsalz@akamai.com> | 2015-06-21 15:37:53 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-06-21 17:52:12 -0400 |
commit | 7fba8407cc72e09dbd8d768100617286b0740b03 (patch) | |
tree | ff1f591a678ba4c7f9410a0c7471f51f87d6396c /crypto/cms | |
parent | 8ca96efd24b73f917837fdd45b1c22d7b8ff8cbd (diff) |
RT3917: add cleanup on an error path
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/cms')
-rw-r--r-- | crypto/cms/cms_smime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index 0d97d3e5f3..b33bc1d958 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -386,7 +386,7 @@ int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, tmpin = BIO_new_mem_buf(ptr, len); if (tmpin == NULL) { CMSerr(CMS_F_CMS_VERIFY, ERR_R_MALLOC_FAILURE); - return 0; + goto err2; } } else tmpin = dcont; @@ -455,6 +455,7 @@ int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, if (out != tmpout) BIO_free_all(tmpout); + err2: sk_X509_pop_free(cms_certs, X509_free); sk_X509_CRL_pop_free(crls, X509_CRL_free); |