From 00737d1e82e9973db1d14422682fcc0c57e8a3b8 Mon Sep 17 00:00:00 2001 From: Nickolas Lapp Date: Fri, 29 Apr 2016 09:45:44 -0600 Subject: [PATCH] Ensure that tmpBuff gets assigned null after free. --- src/ssl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 4600db7f1..e21935202 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -7238,8 +7238,10 @@ int AddSession(WOLFSSL* ssl) SessionCache[row].Sessions[idx].staticTicket; SessionCache[row].Sessions[idx].isDynamic = 0; SessionCache[row].Sessions[idx].ticketLen = 0; - if (tmpBuff) + if (tmpBuff) { XFREE(tmpBuff, ssl->heap, DYNAMIC_TYPE_SESSION_TICK); + tmpBuff = NULL; + } } #endif