Fix for heap pointer in wolfSSL_DupSession.

This commit is contained in:
David Garske 2022-02-24 12:56:39 -08:00
parent 2b794f03c1
commit 6e24e21d5a

View File

@ -24095,10 +24095,10 @@ int wolfSSL_DupSession(const WOLFSSL_SESSION* input, WOLFSSL_SESSION* output,
}
else {
tmp = (byte*)XREALLOC(ticBuff, input->ticketLen,
output->heap, DYNAMIC_TYPE_SESSION_TICK);
input->heap, DYNAMIC_TYPE_SESSION_TICK);
if (tmp == NULL) {
WOLFSSL_MSG("Failed to allocate memory for ticket");
XFREE(ticBuff, ssl->heap, DYNAMIC_TYPE_SESSION_TICK);
XFREE(ticBuff, input->heap, DYNAMIC_TYPE_SESSION_TICK);
output->ticket = NULL;
output->ticketLen = 0;
output->ticketLenAlloc = 0;