Fix allocating new sessions using the dynamic session cache.

This commit is contained in:
Kareem
2023-02-17 15:25:12 -07:00
parent 1167ad623b
commit 8de2eba9ab

View File

@@ -15325,6 +15325,8 @@ int AddSessionToCache(WOLFSSL_CTX* ctx, WOLFSSL_SESSION* addSession,
if (cacheSession == NULL) { if (cacheSession == NULL) {
return MEMORY_E; return MEMORY_E;
} }
XMEMSET(cacheSession, 0, sizeof(WOLFSSL_SESSION));
sessRow->Sessions[idx] = cacheSession;
#else #else
cacheSession = &sessRow->Sessions[idx]; cacheSession = &sessRow->Sessions[idx];
#endif #endif