Commit 7ad4ac47 authored by Ghislain MARY's avatar Ghislain MARY

Fix TLS memory leak.

parent 2a922022
......@@ -404,15 +404,15 @@ void tls_free(tls_t *tls)
if (!tls)
return;
if (tls->con != NULL)
if (tls->con != NULL) {
SSL_shutdown(tls->con);
SSL_shutdown(tls->con);
SSL_free(tls->con);
}
if (tls->ctx != NULL && tls->type != tls_slave)
SSL_CTX_free(tls->ctx);
if (tls->bio_con != NULL)
BIO_free(tls->bio_con);
su_home_unref(tls->home);
}
......@@ -480,7 +480,6 @@ tls_t *tls_init_secondary(tls_t *master, int sock, int accept)
if (tls) {
tls->ctx = master->ctx;
tls->type = master->type;
tls->accept = accept ? 1 : 0;
tls->verify_outgoing = master->verify_outgoing;
tls->verify_incoming = master->verify_incoming;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment