aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-08-06 13:07:34 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-08-06 20:22:17 +0000
commita85a1c352b8eec6ca9ebf2b04726432fb415ff59 (patch)
tree3bdb28eb887bb7cb7425bd57c59377abbd3134fa /src/plugins
parent4b9246ad2008fa791405a3482914960a352237c9 (diff)
tls: avoid ptls ctx free on transport close
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0537fa590b11abddf05550e42c7258549729f8a7
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/tlspicotls/tls_picotls.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/tlspicotls/tls_picotls.c b/src/plugins/tlspicotls/tls_picotls.c
index a0448e93338..7d1b4fcf8e9 100644
--- a/src/plugins/tlspicotls/tls_picotls.c
+++ b/src/plugins/tlspicotls/tls_picotls.c
@@ -48,6 +48,7 @@ picotls_ctx_free (tls_ctx_t * ctx)
{
picotls_ctx_t *ptls_ctx = (picotls_ctx_t *) ctx;
vec_free (ptls_ctx->rx_content);
+ ptls_free (ptls_ctx->tls);
vec_free (ptls_ctx->write_content);
pool_put_index (picotls_main.ctx_pool[ctx->c_thread_index],
ptls_ctx->ptls_ctx_idx);
@@ -200,8 +201,6 @@ picotls_transport_close (tls_ctx_t * ctx)
picotls_handle_handshake_failure (ctx);
return 0;
}
- picotls_ctx_t *ptls_ctx = (picotls_ctx_t *) ctx;
- ptls_free (ptls_ctx->tls);
session_transport_closing_notify (&ctx->connection);
return 0;
}