Fix resource leaks in psp-prxgen.c

Fix resource leaks in psp-prxgen.c
This commit is contained in:
ryancaicse
2022-02-07 15:12:52 +08:00
committed by GitHub
parent 34f7821758
commit 0ba656ab48

View File

@@ -132,6 +132,7 @@ unsigned char *load_file(const char *file)
if(size < sizeof(Elf32_Ehdr))
{
fprintf(stderr, "Error, invalid file size\n");
fclose(fp);
break;
}
@@ -139,6 +140,7 @@ unsigned char *load_file(const char *file)
if(data == NULL)
{
fprintf(stderr, "Error, could not allocate memory for ELF\n");
fclose(fp);
break;
}