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 /demos/bio | |
parent | 2011b169fa90edd4d986e7dbbd3d64587d316a22 (diff) | |
download | openssl-ca3a82c3b364e1e584546f0f3bbb938b0b472580.tar.gz |
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/bio')
-rw-r--r-- | demos/bio/saccept.c | 6 | ||||
-rw-r--r-- | demos/bio/server-arg.c | 3 | ||||
-rw-r--r-- | demos/bio/server-conf.c | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/demos/bio/saccept.c b/demos/bio/saccept.c index 8c75029384..505d98b68f 100644 --- a/demos/bio/saccept.c +++ b/demos/bio/saccept.c @@ -22,8 +22,7 @@ BIO *in = NULL; void close_up() { - if (in != NULL) - BIO_free(in); + BIO_free(in); } int main(int argc, char *argv[]) @@ -101,8 +100,7 @@ int main(int argc, char *argv[]) if (ret) { ERR_print_errors_fp(stderr); } - if (in != NULL) - BIO_free(in); + BIO_free(in); exit(ret); return (!ret); } diff --git a/demos/bio/server-arg.c b/demos/bio/server-arg.c index 7ba54dbe50..4f65227e40 100644 --- a/demos/bio/server-arg.c +++ b/demos/bio/server-arg.c @@ -137,8 +137,7 @@ int main(int argc, char *argv[]) if (ret) { ERR_print_errors_fp(stderr); } - if (in != NULL) - BIO_free(in); + BIO_free(in); exit(ret); return (!ret); } diff --git a/demos/bio/server-conf.c b/demos/bio/server-conf.c index a09bc9320d..5355839f4f 100644 --- a/demos/bio/server-conf.c +++ b/demos/bio/server-conf.c @@ -131,8 +131,7 @@ int main(int argc, char *argv[]) if (ret) { ERR_print_errors_fp(stderr); } - if (in != NULL) - BIO_free(in); + BIO_free(in); exit(ret); return (!ret); } |