mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-22 18:26:39 +00:00
tik: fix memory leak.
This commit is contained in:
parent
cf71f3e484
commit
3d6c65ba25
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
memset(tik->data + tik->size, 0, SIGNED_TIK_MAX_SIZE - tik->size);
|
||||||
|
|
||||||
/* Update output pointers. */
|
/* 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;
|
if (out_raw_cert_chain_size) *out_raw_cert_chain_size = raw_cert_chain_size;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue