mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
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
|
(VOID **)Buffer
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
//
|
||||||
|
// Free the handle buffer
|
||||||
|
//
|
||||||
|
gBS->FreePool (HandleBuffer);
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
ZeroMem (*Buffer, NoHandles * sizeof (VOID *));
|
ZeroMem (*Buffer, NoHandles * sizeof (VOID *));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user