Skip to content

Commit

Permalink
Merge pull request #2354 from slark-yuxj/master
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach authored Apr 16, 2024
2 parents bebc00a + 10a8617 commit e54023d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ repos:
exclude: |
(?x)^(
.idea/|
hw/bsp/mcx/sdk/
hw/bsp/mcx/sdk/|
docs/contributing/code_of_conduct.rst|
docs/info/contributors.rst
)
- id: forbid-submodules

Expand Down
7 changes: 7 additions & 0 deletions hw/mcu/sony/cxd56/mkspk/mkspk.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ static struct elf_file *load_elf(const char *filename)
buf = (char *)malloc(fsize);
if (!buf)
{
free(ef);
fclose(fp);
return NULL;
}
Expand All @@ -191,6 +192,8 @@ static struct elf_file *load_elf(const char *filename)
fclose(fp);
if (ret != 1)
{
free(ef);
free(buf);
return NULL;
}

Expand Down Expand Up @@ -351,8 +354,12 @@ int main(int argc, char **argv)
}

spkimage = create_image(elf, args->core, args->savename, &size);
if(elf->data) {
free(elf->data);
}
free(elf);


c = cipher_init(vmk, NULL);
cipher_calc_cmac(c, spkimage, size, (uint8_t *) spkimage + size);
cipher_deinit(c);
Expand Down

0 comments on commit e54023d

Please sign in to comment.