mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-04 01:00:09 +00:00
Fix resouce leaks in psp-fixup-imports.c
Fix resouce leaks in psp-fixup-imports.c
This commit is contained in:
@@ -183,6 +183,7 @@ unsigned char *load_file(const char *file, unsigned int *size)
|
|||||||
if(*size < sizeof(Elf32_Ehdr))
|
if(*size < sizeof(Elf32_Ehdr))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error, invalid file size\n");
|
fprintf(stderr, "Error, invalid file size\n");
|
||||||
|
fclose(fp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,6 +191,7 @@ unsigned char *load_file(const char *file, unsigned int *size)
|
|||||||
if(data == NULL)
|
if(data == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error, could not allocate memory for ELF\n");
|
fprintf(stderr, "Error, could not allocate memory for ELF\n");
|
||||||
|
fclose(fp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user