mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-07 05:54:11 +08:00
Merge pull request #2354 from slark-yuxj/master
This commit is contained in:
commit
e54023d765
@ -16,7 +16,9 @@ repos:
|
|||||||
exclude: |
|
exclude: |
|
||||||
(?x)^(
|
(?x)^(
|
||||||
.idea/|
|
.idea/|
|
||||||
hw/bsp/mcx/sdk/
|
hw/bsp/mcx/sdk/|
|
||||||
|
docs/contributing/code_of_conduct.rst|
|
||||||
|
docs/info/contributors.rst
|
||||||
)
|
)
|
||||||
- id: forbid-submodules
|
- id: forbid-submodules
|
||||||
|
|
||||||
|
@ -183,6 +183,7 @@ static struct elf_file *load_elf(const char *filename)
|
|||||||
buf = (char *)malloc(fsize);
|
buf = (char *)malloc(fsize);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
{
|
{
|
||||||
|
free(ef);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -191,6 +192,8 @@ static struct elf_file *load_elf(const char *filename)
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
if (ret != 1)
|
if (ret != 1)
|
||||||
{
|
{
|
||||||
|
free(ef);
|
||||||
|
free(buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,8 +354,12 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
spkimage = create_image(elf, args->core, args->savename, &size);
|
spkimage = create_image(elf, args->core, args->savename, &size);
|
||||||
|
if(elf->data) {
|
||||||
|
free(elf->data);
|
||||||
|
}
|
||||||
free(elf);
|
free(elf);
|
||||||
|
|
||||||
|
|
||||||
c = cipher_init(vmk, NULL);
|
c = cipher_init(vmk, NULL);
|
||||||
cipher_calc_cmac(c, spkimage, size, (uint8_t *) spkimage + size);
|
cipher_calc_cmac(c, spkimage, size, (uint8_t *) spkimage + size);
|
||||||
cipher_deinit(c);
|
cipher_deinit(c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user