1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-08 11:51:48 +00:00

tik: fix memory leak.

This commit is contained in:
Pablo Curiel 2023-05-25 01:22:54 +02:00
parent cf71f3e484
commit 3d6c65ba25

View file

@ -231,7 +231,13 @@ bool tikConvertPersonalizedTicketToCommonTicket(Ticket *tik, u8 **out_raw_cert_c
memset(tik->data + tik->size, 0, SIGNED_TIK_MAX_SIZE - tik->size);
/* Update output pointers. */
if (out_raw_cert_chain) *out_raw_cert_chain = raw_cert_chain;
if (out_raw_cert_chain)
{
*out_raw_cert_chain = raw_cert_chain;
} else {
free(raw_cert_chain);
}
if (out_raw_cert_chain_size) *out_raw_cert_chain_size = raw_cert_chain_size;
return true;