summaryrefslogtreecommitdiffstats
path: root/IntelFrameworkPkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-06-04 18:05:34 +0800
committerStar Zeng <star.zeng@intel.com>2018-06-05 17:43:16 +0800
commit76022b02e867c7372c07d575a1733b8a84c6615a (patch)
treed74aa5aff852801f51d099d6252105e5ec142b39 /IntelFrameworkPkg
parentfe507283afe245dae5ffdc0f926d9e2abb355250 (diff)
downloadedk2-76022b02e867c7372c07d575a1733b8a84c6615a.tar.gz
edk2-76022b02e867c7372c07d575a1733b8a84c6615a.tar.bz2
edk2-76022b02e867c7372c07d575a1733b8a84c6615a.zip
IntelFrameworkPkg FrameworkUefiLib: Fix in EfiLocateProtocolBuffer()
Free HandleBuffer for error path in EfiLocateProtocolBuffer(). Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'IntelFrameworkPkg')
-rw-r--r--IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
index 1d71f471b8..3eeb12110a 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
@@ -1650,6 +1650,10 @@ EfiLocateProtocolBuffer (
(VOID **)Buffer
);
if (EFI_ERROR (Status)) {
+ //
+ // Free the handle buffer
+ //
+ gBS->FreePool (HandleBuffer);
return EFI_OUT_OF_RESOURCES;
}
ZeroMem (*Buffer, NoHandles * sizeof (VOID *));