summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
diff options
context:
space:
mode:
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-14 06:54:35 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-09-14 06:54:35 +0000
commitd26c7e82f2bf80dd2a64b61fee33a3f3f5e01d5a (patch)
treeb6fd1300299f4041b03861ead824d9a5b19ccf6d /MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
parent42ed76042a117057d819218164dd9cddff1ae7a0 (diff)
downloadedk2-platforms-d26c7e82f2bf80dd2a64b61fee33a3f3f5e01d5a.tar.xz
Fix the issue that FTW driver fail to reclaim WorkSpace.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Hengyan Tao <hengyan.tao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13732 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c')
-rw-r--r--MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
index 47ec118592..2537d22e2c 100644
--- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
+++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
@@ -209,6 +209,8 @@ GetFvbCountAndBuffer (
*NumberHandles = BufferSize / sizeof(EFI_HANDLE);
if (EFI_ERROR(Status)) {
*NumberHandles = 0;
+ FreePool (*Buffer);
+ *Buffer = NULL;
}
return Status;