mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
fe507283af
commit
76022b02e8
|
@ -1650,6 +1650,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…
Reference in New Issue