From a704784969a88bb9ea42e9c94877e65989b54203 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Thu, 25 Dec 2014 18:15:58 -0500 Subject: ich9deblob: close file if there are errors --- (limited to 'resources/utilities/ich9deblob/src') diff --git a/resources/utilities/ich9deblob/src/ich9deblob.c b/resources/utilities/ich9deblob/src/ich9deblob.c index ee549d2..313416c 100644 --- a/resources/utilities/ich9deblob/src/ich9deblob.c +++ b/resources/utilities/ich9deblob/src/ich9deblob.c @@ -99,6 +99,7 @@ int main(int argc, char *argv[]) if (NULL == fileStream) { printf("\nerror: could not open factory.rom\n"); + fclose(fileStream); return 1; } printf("\nfactory.rom opened successfully\n"); @@ -111,6 +112,7 @@ int main(int argc, char *argv[]) if (DESCRIPTORREGIONSIZE != bufferLength) // { printf("\nerror: could not read descriptor from factory.rom (%i) bytes read\n", bufferLength); + fclose(fileStream); return 1; } printf("\ndescriptor region read successfully\n"); @@ -150,6 +152,7 @@ int main(int argc, char *argv[]) if (GBEREGIONSIZE_8K != bufferLength) { printf("\nerror: could not read GBe region from factory.rom (%i) bytes read\n", bufferLength); + fclose(fileStream); return 1; } printf("\ngbe (8KiB) region read successfully\n"); -- cgit v0.9.1