Cc: Liming Gao <liming....@intel.com>
Cc: Yonghong Zhu <yonghong....@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a...@intel.com>
---
 BaseTools/Source/C/EfiRom/EfiRom.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/C/EfiRom/EfiRom.c 
b/BaseTools/Source/C/EfiRom/EfiRom.c
index e862989..afb53cd 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 ());
   }
-- 
1.9.5.msysgit.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to