summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BaseTools/Source/C/EfiRom/EfiRom.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/BaseTools/Source/C/EfiRom/EfiRom.c b/BaseTools/Source/C/EfiRom/EfiRom.c
index 2e51315600..c58c1523e9 100644
--- a/BaseTools/Source/C/EfiRom/EfiRom.c
+++ b/BaseTools/Source/C/EfiRom/EfiRom.c
@@ -176,9 +176,6 @@ Returns:
BailOut:
if (Status == STATUS_SUCCESS) {
- if (FptrOut != NULL) {
- fclose (FptrOut);
- }
//
// Clean up our file list
//
@@ -189,6 +186,10 @@ BailOut:
}
}
+ if (FptrOut != NULL) {
+ fclose (FptrOut);
+ }
+
if (mOptions.Verbose) {
VerboseMsg("%s tool done with return code is 0x%x.\n", UTILITY_NAME, GetUtilityStatus ());
}