summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/conn.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/conn.c b/lib/conn.c
index 9f114a5..249c50d 100644
--- a/lib/conn.c
+++ b/lib/conn.c
@@ -126,6 +126,12 @@ rs_conn_destroy (struct rs_connection *conn)
if (conn->is_connected)
err = rs_conn_disconnect (conn);
+
+ if (conn->tls_ssl) /* FIXME: Free SSL strucxt in rs_conn_disconnect? */
+ SSL_free (conn->tls_ssl);
+ if (conn->tls_ctx)
+ SSL_CTX_free (conn->tls_ctx);
+
if (conn->tev)
event_free (conn->tev);
if (conn->bev)
@@ -137,9 +143,6 @@ rs_conn_destroy (struct rs_connection *conn)
if (conn->evb)
event_base_free (conn->evb);
- /* TODO: free tls_ctx */
- /* TODO: free tls_ssl */
-
rs_free (conn->ctx, conn);
return err;