mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-04 01:00:09 +00:00
Fix resource leaks in psp-prxgen.c
Fix resource leaks in psp-prxgen.c
This commit is contained in:
@@ -132,6 +132,7 @@ unsigned char *load_file(const char *file)
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,6 +140,7 @@ unsigned char *load_file(const char *file)
|
|||||||
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