diff options
author | Star Zeng <star.zeng@intel.com> | 2018-06-04 18:05:34 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-06-05 17:43:16 +0800 |
commit | 76022b02e867c7372c07d575a1733b8a84c6615a (patch) | |
tree | d74aa5aff852801f51d099d6252105e5ec142b39 | |
parent | fe507283afe245dae5ffdc0f926d9e2abb355250 (diff) | |
download | edk2-76022b02e867c7372c07d575a1733b8a84c6615a.zip edk2-76022b02e867c7372c07d575a1733b8a84c6615a.tar.gz edk2-76022b02e867c7372c07d575a1733b8a84c6615a.tar.bz2 |
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>
-rw-r--r-- | IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c index 1d71f47..3eeb121 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 *));
|