summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/EfiRom
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-09-30 10:41:26 +0800
committerHao Wu <hao.a.wu@intel.com>2016-11-08 16:37:54 +0800
commit1e124de0188e6e3ed557500cc429cf7a756786d3 (patch)
treefa3d1f025113f54211008936cf8e5ef356fd10be /BaseTools/Source/C/EfiRom
parent85006654944a0f9e64974f23705beb7bc4906bcc (diff)
downloadedk2-1e124de0188e6e3ed557500cc429cf7a756786d3.zip
edk2-1e124de0188e6e3ed557500cc429cf7a756786d3.tar.gz
edk2-1e124de0188e6e3ed557500cc429cf7a756786d3.tar.bz2
BaseTools/EfiRom: Fix file handles not being closed
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/C/EfiRom')
-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 2e51315..c58c152 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 ());
}