Ensure that tmpBuff gets assigned null after free.

This commit is contained in:
Nickolas Lapp 2016-04-29 09:45:44 -06:00
parent ccee49978b
commit 00737d1e82

View File

@ -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