summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BaseTools/Source/C/GenPage/GenPage.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/C/GenPage/GenPage.c b/BaseTools/Source/C/GenPage/GenPage.c
index e22485c4ae..3bb05efa36 100644
--- a/BaseTools/Source/C/GenPage/GenPage.c
+++ b/BaseTools/Source/C/GenPage/GenPage.c
@@ -431,9 +431,11 @@ main (
//
result = GenBinPage (BaseMemory, InputFile, OutputFile);
if (result < 0) {
+ free (BaseMemory);
return STATUS_ERROR;
}
+ free (BaseMemory);
return 0;
}