mirror of https://github.com/acidanthera/audk.git
MdePkg UefiLib: 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>
This commit is contained in:
parent
31f70606c6
commit
fe507283af
|
@ -1678,6 +1678,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 *));
|
||||
|
|
Loading…
Reference in New Issue