From dd4eaf1573d7c6b01bb4de2b5055c5ccc30730c8 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Fri, 10 Mar 2017 10:22:30 +0800 Subject: [PATCH] MdeModulePkg/CapsuleLib: Free the buffer returned by GetVariable2 API Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Jiewen Yao --- MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c index fc0f8698a9..3fed8e06e4 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c @@ -342,6 +342,10 @@ InitCapsuleLastVariable ( 0, NULL ); + } else { + if (CapsuleResult != NULL) { + FreePool (CapsuleResult); + } } } -- 2.39.2