MdeModulePkg/CapsuleLib: Free the buffer returned by GetVariable2 API

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Hao Wu 2017-03-10 10:22:30 +08:00
parent 96b17e00b9
commit dd4eaf1573
1 changed files with 4 additions and 0 deletions

View File

@ -342,6 +342,10 @@ InitCapsuleLastVariable (
0,
NULL
);
} else {
if (CapsuleResult != NULL) {
FreePool (CapsuleResult);
}
}
}