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:
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);
|
||||
|
||||
/* 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;
|
||||
|
|
Loading…
Reference in a new issue