diff options
author | Rich Salz <rsalz@openssl.org> | 2015-03-25 11:31:18 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-03-25 11:31:18 -0400 |
commit | ca3a82c3b364e1e584546f0f3bbb938b0b472580 (patch) | |
tree | 06c73d297f19629c1bf56bbf06dd2d443d4ac78f /crypto/cms/cms_smime.c | |
parent | 2011b169fa90edd4d986e7dbbd3d64587d316a22 (diff) |
free NULL cleanup
This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free
BIO_free BIO_free_all BIO_vfree
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/cms/cms_smime.c')
-rw-r--r-- | crypto/cms/cms_smime.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index 6f6f20d63a..f491ec9e77 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -114,7 +114,7 @@ static int cms_copy_content(BIO *out, BIO *in, unsigned int flags) r = 1; err: - if (tmpout && (tmpout != out)) + if (tmpout != out) BIO_free(tmpout); return r; @@ -446,14 +446,13 @@ int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, if (tmpin != dcont) BIO_free(tmpin); } else { - if (dcont && (tmpin == dcont)) do_free_upto(cmsbio, dcont); else BIO_free_all(cmsbio); } - if (tmpout && out != tmpout) + if (out != tmpout) BIO_free_all(tmpout); if (cms_certs) @@ -580,8 +579,7 @@ CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, r = 1; err: - if (rct_cont) - BIO_free(rct_cont); + BIO_free(rct_cont); if (r) return cms; CMS_ContentInfo_free(cms); |