Don't orphan ticBuff pointer in wolfSSL_DupSessionEx

This commit is contained in:
jordan
2023-05-17 16:25:27 -04:00
parent 979b92deb8
commit 9d05a4f2ed

View File

@@ -21455,8 +21455,8 @@ static int wolfSSL_DupSessionEx(const WOLFSSL_SESSION* input,
* the static buffer. */
if (ticBuff != NULL) {
if (ticLenAlloc >= input->ticketLen) {
output->ticket = output->staticTicket;
output->ticketLenAlloc = 0;
output->ticket = ticBuff;
output->ticketLenAlloc = ticLenAlloc;
}
else {
WOLFSSL_MSG("ticket dynamic buffer too small but we are "