diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-14 15:20:17 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-14 15:20:17 +0100 |
commit | f45faec5b0d1052ed37295a6d421d70d0b0ff638 (patch) | |
tree | 8e0b472f33d398df00b4c9b75e2e4d91795a0d09 | |
parent | 963d7950fd7eeff9e2bafb4154ca83ed66c2f748 (diff) |
[TLS] Do free SSL and SSL_CTX objects.
-rw-r--r-- | lib/conn.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; |