mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-21 16:20:46 +00:00
commit
46f7cf4da2
@ -172,6 +172,7 @@ static struct elf_file *load_elf(const char *filename)
|
|||||||
ef = (struct elf_file *)malloc(sizeof(*ef));
|
ef = (struct elf_file *)malloc(sizeof(*ef));
|
||||||
if (!ef)
|
if (!ef)
|
||||||
{
|
{
|
||||||
|
fclose(fp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,6 +183,7 @@ static struct elf_file *load_elf(const char *filename)
|
|||||||
buf = (char *)malloc(fsize);
|
buf = (char *)malloc(fsize);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
{
|
{
|
||||||
|
fclose(fp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user