diff options
author | Francis Rowe <info@gluglug.org.uk> | 2014-12-25 23:15:58 +0000 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2014-12-25 23:15:58 +0000 |
commit | a704784969a88bb9ea42e9c94877e65989b54203 (patch) | |
tree | aa6f36bd318f6a0e6155a37a426b80af5087364c | |
parent | e91830663943e36417dde6f549807a91b4d6af88 (diff) | |
download | librebootfr-a704784969a88bb9ea42e9c94877e65989b54203.tar.gz librebootfr-a704784969a88bb9ea42e9c94877e65989b54203.zip |
ich9deblob: close file if there are errors
-rw-r--r-- | resources/utilities/ich9deblob/src/ich9deblob.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/resources/utilities/ich9deblob/src/ich9deblob.c b/resources/utilities/ich9deblob/src/ich9deblob.c index ee549d2d..313416c6 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"); |