diff options
author | Rich Salz <rsalz@openssl.org> | 2015-03-25 16:31:18 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-03-25 16:31:18 +0100 |
commit | ca3a82c3b364e1e584546f0f3bbb938b0b472580 (patch) | |
tree | 06c73d297f19629c1bf56bbf06dd2d443d4ac78f /demos/smime | |
parent | Support key loading from certificate file (diff) | |
download | openssl-ca3a82c3b364e1e584546f0f3bbb938b0b472580.tar.xz openssl-ca3a82c3b364e1e584546f0f3bbb938b0b472580.zip |
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 'demos/smime')
-rw-r--r-- | demos/smime/smdec.c | 9 | ||||
-rw-r--r-- | demos/smime/smenc.c | 9 | ||||
-rw-r--r-- | demos/smime/smsign.c | 9 | ||||
-rw-r--r-- | demos/smime/smsign2.c | 9 | ||||
-rw-r--r-- | demos/smime/smver.c | 9 |
5 files changed, 15 insertions, 30 deletions
diff --git a/demos/smime/smdec.c b/demos/smime/smdec.c index 6814d5199b..b50f8dffaf 100644 --- a/demos/smime/smdec.c +++ b/demos/smime/smdec.c @@ -66,12 +66,9 @@ int main(int argc, char **argv) if (rkey) EVP_PKEY_free(rkey); - if (in) - BIO_free(in); - if (out) - BIO_free(out); - if (tbio) - BIO_free(tbio); + BIO_free(in); + BIO_free(out); + BIO_free(tbio); return ret; diff --git a/demos/smime/smenc.c b/demos/smime/smenc.c index 18bf7b1618..5a85537ad0 100644 --- a/demos/smime/smenc.c +++ b/demos/smime/smenc.c @@ -80,12 +80,9 @@ int main(int argc, char **argv) if (recips) sk_X509_pop_free(recips, X509_free); - if (in) - BIO_free(in); - if (out) - BIO_free(out); - if (tbio) - BIO_free(tbio); + BIO_free(in); + BIO_free(out); + BIO_free(tbio); return ret; diff --git a/demos/smime/smsign.c b/demos/smime/smsign.c index c7bf86d370..6b9dfdd771 100644 --- a/demos/smime/smsign.c +++ b/demos/smime/smsign.c @@ -76,12 +76,9 @@ int main(int argc, char **argv) if (skey) EVP_PKEY_free(skey); - if (in) - BIO_free(in); - if (out) - BIO_free(out); - if (tbio) - BIO_free(tbio); + BIO_free(in); + BIO_free(out); + BIO_free(tbio); return ret; diff --git a/demos/smime/smsign2.c b/demos/smime/smsign2.c index a116094341..5d9de35c46 100644 --- a/demos/smime/smsign2.c +++ b/demos/smime/smsign2.c @@ -90,12 +90,9 @@ int main(int argc, char **argv) if (skey) EVP_PKEY_free(skey2); - if (in) - BIO_free(in); - if (out) - BIO_free(out); - if (tbio) - BIO_free(tbio); + BIO_free(in); + BIO_free(out); + BIO_free(tbio); return ret; diff --git a/demos/smime/smver.c b/demos/smime/smver.c index 21937df307..4088d3c38e 100644 --- a/demos/smime/smver.c +++ b/demos/smime/smver.c @@ -73,12 +73,9 @@ int main(int argc, char **argv) if (cacert) X509_free(cacert); - if (in) - BIO_free(in); - if (out) - BIO_free(out); - if (tbio) - BIO_free(tbio); + BIO_free(in); + BIO_free(out); + BIO_free(tbio); return ret; |