From 8c1310e3764cc979ca785b3adea09991c9eb8ff9 Mon Sep 17 00:00:00 2001 From: toddouska Date: Mon, 29 Apr 2013 16:56:30 -0700 Subject: [PATCH] fix mem save/restore size with clientcache --- src/ssl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 23f72808e..fc971f834 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -2699,7 +2699,13 @@ typedef struct { /* get how big the the session cache save buffer needs to be */ int CyaSSL_get_session_cache_memsize(void) { - return (int)(sizeof(SessionCache) + sizeof(cache_header_t)); + int sz = (int)(sizeof(SessionCache) + sizeof(cache_header_t)); + + #ifndef NO_CLIENT_CACHE + sz += (int)(sizeof(ClientCache)); + #endif + + return sz; }