mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-03 16:51:27 +00:00
fix resource leaks
This commit is contained in:
@@ -92,6 +92,7 @@ int main(int argc, char *argv[]) {
|
||||
fseek(infile, 0, SEEK_SET);
|
||||
if (total_size < 0) {
|
||||
printf("ERROR: Could not get the input file size.\n");
|
||||
fclose(infile);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -99,6 +100,7 @@ int main(int argc, char *argv[]) {
|
||||
size_t result = fread(&header, sizeof(HEADER), 1, infile);
|
||||
if (result < 0) {
|
||||
printf("ERROR: Could not read the input file header.\n");
|
||||
fclose(infile);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user