summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Application
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-07-13 15:04:16 +0800
committerStar Zeng <star.zeng@intel.com>2018-07-23 09:17:24 +0800
commitd4d9116775763a7ce4bff894ea06ecef4b17e441 (patch)
treebc05e926b74a08fdc373ddc46971677bb6505d3a /MdeModulePkg/Application
parent5410502f6d7e4bb786ccd6c30c8662ed217bcaba (diff)
downloadedk2-d4d9116775763a7ce4bff894ea06ecef4b17e441.tar.gz
edk2-d4d9116775763a7ce4bff894ea06ecef4b17e441.tar.bz2
edk2-d4d9116775763a7ce4bff894ea06ecef4b17e441.zip
MdeModulePkg CapsuleApp: Fix memory leak in DumpFmpImage()
Image buffer should be freed after using. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'MdeModulePkg/Application')
-rw-r--r--MdeModulePkg/Application/CapsuleApp/CapsuleDump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
index 6c1320942b..c0197dd640 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
@@ -953,5 +953,7 @@ DumpFmpImage (
Status = WriteFileFromBuffer(ImageName, ImageSize, Image);
Print(L"CapsuleApp: Dump %g ImageIndex (0x%x) to %s %r\n", ImageTypeId, ImageIndex, ImageName, Status);
+ FreePool (Image);
+
return ;
}