From: Hao Wu Date: Fri, 30 Sep 2016 02:41:26 +0000 (+0800) Subject: BaseTools/EfiRom: Fix file handles not being closed X-Git-Tag: edk2-stable201903~5312 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=1e124de0188e6e3ed557500cc429cf7a756786d3 BaseTools/EfiRom: Fix file handles not being closed Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Liming Gao --- 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 ()); }