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>
This commit is contained in:
Star Zeng 2018-07-13 15:04:16 +08:00
parent 5410502f6d
commit d4d9116775
1 changed files with 2 additions and 0 deletions

View File

@ -953,5 +953,7 @@ DumpFmpImage (
Status = WriteFileFromBuffer(ImageName, ImageSize, Image); Status = WriteFileFromBuffer(ImageName, ImageSize, Image);
Print(L"CapsuleApp: Dump %g ImageIndex (0x%x) to %s %r\n", ImageTypeId, ImageIndex, ImageName, Status); Print(L"CapsuleApp: Dump %g ImageIndex (0x%x) to %s %r\n", ImageTypeId, ImageIndex, ImageName, Status);
FreePool (Image);
return ; return ;
} }