mirror of
https://github.com/Decscots/Lockpick_RCM.git
synced 2024-11-25 20:06:56 +01:00
sept: Prevent memory leak
This commit is contained in:
parent
2d4ffd2965
commit
472aa1665e
@ -107,8 +107,10 @@ int reboot_to_sept(const u8 *tsec_fw, const u32 tsec_size, const u32 kb)
|
|||||||
|
|
||||||
tmp_cfg->boot_cfg |= BOOT_CFG_SEPT_RUN;
|
tmp_cfg->boot_cfg |= BOOT_CFG_SEPT_RUN;
|
||||||
|
|
||||||
if (f_open(&fp, "sd:/sept/payload.bin", FA_READ | FA_WRITE))
|
if (f_open(&fp, "sd:/sept/payload.bin", FA_READ | FA_WRITE)) {
|
||||||
|
free(tmp_cfg);
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
f_lseek(&fp, PATCHED_RELOC_SZ);
|
f_lseek(&fp, PATCHED_RELOC_SZ);
|
||||||
f_write(&fp, tmp_cfg, sizeof(boot_cfg_t), NULL);
|
f_write(&fp, tmp_cfg, sizeof(boot_cfg_t), NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user