diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 14:37:16 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 14:37:16 -0400 |
commit | 25aaa98aa249d26391c1994d2de449562c8b8b99 (patch) | |
tree | 6f83efd87fa9fd832e8a456e9686143a29f1dab3 /demos/cms | |
parent | 666964780a245c14e8f0eb6e13dd854a37387ea9 (diff) |
free NULL cleanup -- coda
After the finale, the "real" final part. :) Do a recursive grep with
"-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are
an "if NULL" check that can be removed.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'demos/cms')
-rw-r--r-- | demos/cms/cms_comp.c | 5 | ||||
-rw-r--r-- | demos/cms/cms_ddec.c | 6 | ||||
-rw-r--r-- | demos/cms/cms_dec.c | 6 | ||||
-rw-r--r-- | demos/cms/cms_denc.c | 6 | ||||
-rw-r--r-- | demos/cms/cms_enc.c | 6 | ||||
-rw-r--r-- | demos/cms/cms_sign.c | 6 | ||||
-rw-r--r-- | demos/cms/cms_sign2.c | 6 | ||||
-rw-r--r-- | demos/cms/cms_uncomp.c | 6 | ||||
-rw-r--r-- | demos/cms/cms_ver.c | 7 |
9 files changed, 9 insertions, 45 deletions
diff --git a/demos/cms/cms_comp.c b/demos/cms/cms_comp.c index e117d37b5e..f902d20e6d 100644 --- a/demos/cms/cms_comp.c +++ b/demos/cms/cms_comp.c @@ -48,11 +48,8 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); + CMS_ContentInfo_free(cms); BIO_free(in); BIO_free(out); - return ret; - } diff --git a/demos/cms/cms_ddec.c b/demos/cms/cms_ddec.c index 36bb4ee081..3b23e8d30b 100644 --- a/demos/cms/cms_ddec.c +++ b/demos/cms/cms_ddec.c @@ -68,16 +68,12 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); + CMS_ContentInfo_free(cms); X509_free(rcert); EVP_PKEY_free(rkey); - BIO_free(in); BIO_free(out); BIO_free(tbio); BIO_free(dcont); - return ret; - } diff --git a/demos/cms/cms_dec.c b/demos/cms/cms_dec.c index 832b54d43c..22181c25ff 100644 --- a/demos/cms/cms_dec.c +++ b/demos/cms/cms_dec.c @@ -59,15 +59,11 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); + CMS_ContentInfo_free(cms); X509_free(rcert); EVP_PKEY_free(rkey); - BIO_free(in); BIO_free(out); BIO_free(tbio); - return ret; - } diff --git a/demos/cms/cms_denc.c b/demos/cms/cms_denc.c index f91fec1df3..8aa82aa808 100644 --- a/demos/cms/cms_denc.c +++ b/demos/cms/cms_denc.c @@ -77,16 +77,12 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); + CMS_ContentInfo_free(cms); X509_free(rcert); sk_X509_pop_free(recips, X509_free); - BIO_free(in); BIO_free(out); BIO_free(dout); BIO_free(tbio); - return ret; - } diff --git a/demos/cms/cms_enc.c b/demos/cms/cms_enc.c index ba62f7920e..f4ba5428ee 100644 --- a/demos/cms/cms_enc.c +++ b/demos/cms/cms_enc.c @@ -73,15 +73,11 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); + CMS_ContentInfo_free(cms); X509_free(rcert); sk_X509_pop_free(recips, X509_free); - BIO_free(in); BIO_free(out); BIO_free(tbio); - return ret; - } diff --git a/demos/cms/cms_sign.c b/demos/cms/cms_sign.c index e9871dfd36..8b5a64d957 100644 --- a/demos/cms/cms_sign.c +++ b/demos/cms/cms_sign.c @@ -69,15 +69,11 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); + CMS_ContentInfo_free(cms); X509_free(scert); EVP_PKEY_free(skey); - BIO_free(in); BIO_free(out); BIO_free(tbio); - return ret; - } diff --git a/demos/cms/cms_sign2.c b/demos/cms/cms_sign2.c index 127f5860ee..9fdd0353bf 100644 --- a/demos/cms/cms_sign2.c +++ b/demos/cms/cms_sign2.c @@ -77,9 +77,7 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); - + CMS_ContentInfo_free(cms); X509_free(scert); EVP_PKEY_free(skey); X509_free(scert2); @@ -87,7 +85,5 @@ int main(int argc, char **argv) BIO_free(in); BIO_free(out); BIO_free(tbio); - return ret; - } diff --git a/demos/cms/cms_uncomp.c b/demos/cms/cms_uncomp.c index 8d45834c34..2c10b8120e 100644 --- a/demos/cms/cms_uncomp.c +++ b/demos/cms/cms_uncomp.c @@ -42,12 +42,8 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); - + CMS_ContentInfo_free(cms); BIO_free(in); BIO_free(out); - return ret; - } diff --git a/demos/cms/cms_ver.c b/demos/cms/cms_ver.c index 0f34bbf335..c6e83c054a 100644 --- a/demos/cms/cms_ver.c +++ b/demos/cms/cms_ver.c @@ -67,15 +67,10 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); } - if (cms) - CMS_ContentInfo_free(cms); - + CMS_ContentInfo_free(cms); X509_free(cacert); - BIO_free(in); BIO_free(out); BIO_free(tbio); - return ret; - } |