aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsmbedtls
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-03-29 17:49:37 -0700
committerDave Wallace <dwallacelf@gmail.com>2022-10-31 15:24:18 +0000
commit009303dc06f8ecf4ed16c71e18c4e7fd40372eeb (patch)
tree3918bb5ded9abeefbf5e4a0bbb6e6bd05f6cfe0a /src/plugins/tlsmbedtls
parentd82c39e5ff91e858c53cc67fb30d29a1d476f31b (diff)
tls: use safe pool reallocs
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia2c771cbf826526d2d06b6da022509ab02917350
Diffstat (limited to 'src/plugins/tlsmbedtls')
-rw-r--r--src/plugins/tlsmbedtls/tls_mbedtls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/tlsmbedtls/tls_mbedtls.c b/src/plugins/tlsmbedtls/tls_mbedtls.c
index 8d6b7ac5498..a6b968eac14 100644
--- a/src/plugins/tlsmbedtls/tls_mbedtls.c
+++ b/src/plugins/tlsmbedtls/tls_mbedtls.c
@@ -74,7 +74,8 @@ mbedtls_ctx_alloc (void)
mbedtls_main_t *tm = &mbedtls_main;
mbedtls_ctx_t **ctx;
- pool_get (tm->ctx_pool[thread_index], ctx);
+ pool_get_aligned_safe (tm->ctx_pool[thread_index], ctx,
+ CLIB_CACHE_LINE_BYTES);
if (!(*ctx))
*ctx = clib_mem_alloc (sizeof (mbedtls_ctx_t));