diff --git a/src/ssl.c b/src/ssl.c index 4a19c0873..79d2e0a0d 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -15325,6 +15325,8 @@ int AddSessionToCache(WOLFSSL_CTX* ctx, WOLFSSL_SESSION* addSession, if (cacheSession == NULL) { return MEMORY_E; } + XMEMSET(cacheSession, 0, sizeof(WOLFSSL_SESSION)); + sessRow->Sessions[idx] = cacheSession; #else cacheSession = &sessRow->Sessions[idx]; #endif