summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--radsecproxy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 16a1593..dc495cd 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2550,8 +2550,10 @@ void *tlsservernew(void *arg) {
X509_free(cert);
exit:
- SSL_shutdown(ssl);
- SSL_free(ssl);
+ if (ssl) {
+ SSL_shutdown(ssl);
+ SSL_free(ssl);
+ }
ERR_remove_state(0);
shutdown(s, SHUT_RDWR);
close(s);