File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14356,12 +14356,9 @@ int wolfSSL_Cleanup(void)
1435614356{
1435714357 int ret = WOLFSSL_SUCCESS; /* Only the first error will be returned */
1435814358 int release = 0;
14359- #if !defined(NO_SESSION_CACHE) && (defined(ENABLE_SESSION_CACHE_ROW_LOCK) || \
14360- defined(SESSION_CACHE_DYNAMIC_MEM))
14359+ #if !defined(NO_SESSION_CACHE)
1436114360 int i;
14362- #ifdef SESSION_CACHE_DYNAMIC_MEM
1436314361 int j;
14364- #endif
1436514362#endif
1436614363
1436714364 WOLFSSL_ENTER("wolfSSL_Cleanup");
@@ -14406,17 +14403,20 @@ int wolfSSL_Cleanup(void)
1440614403 }
1440714404 session_lock_valid = 0;
1440814405 #endif
14409- #ifdef SESSION_CACHE_DYNAMIC_MEM
1441014406 for (i = 0; i < SESSION_ROWS; i++) {
1441114407 for (j = 0; j < SESSIONS_PER_ROW; j++) {
14408+ #ifdef SESSION_CACHE_DYNAMIC_MEM
1441214409 if (SessionCache[i].Sessions[j]) {
14410+ EvictSessionFromCache(SessionCache[i].Sessions[j]);
1441314411 XFREE(SessionCache[i].Sessions[j], SessionCache[i].heap,
1441414412 DYNAMIC_TYPE_SESSION);
1441514413 SessionCache[i].Sessions[j] = NULL;
1441614414 }
14415+ #else
14416+ EvictSessionFromCache(&SessionCache[i].Sessions[j]);
14417+ #endif
1441714418 }
1441814419 }
14419- #endif
1442014420 #ifndef NO_CLIENT_CACHE
1442114421 if ((clisession_mutex_valid == 1) &&
1442214422 (wc_FreeMutex(&clisession_mutex) != 0)) {
You can’t perform that action at this time.
0 commit comments