aboutsummaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2006-03-18 14:24:02 +0000
committerNils Larsch <nils@openssl.org>2006-03-18 14:24:02 +0000
commitd916ba1ba176adae488f148818eafc4e8c1a38ca (patch)
treec44444157aca683e7ee2e93cbaafc8e77e31dc6f /apps/s_server.c
parent33af4421f2ae5e4d0da3a121f51820f4b49a724c (diff)
downloadopenssl-d916ba1ba176adae488f148818eafc4e8c1a38ca.tar.gz
check if con != NULL before using it
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 72d0b6cd4b..903f1c47fc 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1813,13 +1813,16 @@ again:
}
}
err:
- BIO_printf(bio_s_out,"shutting down SSL\n");
+ if (con != NULL)
+ {
+ BIO_printf(bio_s_out,"shutting down SSL\n");
#if 1
- SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
+ SSL_set_shutdown(con,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
#else
- SSL_shutdown(con);
+ SSL_shutdown(con);
#endif
- if (con != NULL) SSL_free(con);
+ SSL_free(con);
+ }
BIO_printf(bio_s_out,"CONNECTION CLOSED\n");
if (buf != NULL)
{