From 710f49795fba3e08aed329343010b777b46d15c5 Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 18 Apr 2022 14:29:42 -0700 Subject: [PATCH] Fix for session cache locking with session stats in `get_locked_session_stats`. --- src/ssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index b7e861980..4a522cc7b 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -13817,6 +13817,9 @@ static int get_locked_session_stats(word32* active, word32* total, word32* peak) WOLFSSL_ENTER("get_locked_session_stats"); +#ifndef ENABLE_SESSION_CACHE_ROW_LOCK + wc_LockMutex(&session_mutex); +#endif for (i = 0; i < SESSION_ROWS; i++) { SessionRow* row = &SessionCache[i]; #ifdef ENABLE_SESSION_CACHE_ROW_LOCK