mirror of https://github.com/acidanthera/audk.git
RedfishPkg: RedfishDiscoverDxe: fix memory leak on error path.
Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
This commit is contained in:
parent
d81813368a
commit
a87e8505b1
|
@ -829,6 +829,10 @@ AddAndSignalNewRedfishService (
|
|||
} while (TRUE);
|
||||
}
|
||||
|
||||
if (Char16Uuid != NULL) {
|
||||
FreePool (Char16Uuid);
|
||||
}
|
||||
|
||||
if (NewFound || InfoRefresh) {
|
||||
if (!InfoRefresh) {
|
||||
DiscoveredList = (EFI_REDFISH_DISCOVERED_INTERNAL_LIST *)AllocateZeroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_LIST));
|
||||
|
@ -907,10 +911,6 @@ AddAndSignalNewRedfishService (
|
|||
}
|
||||
}
|
||||
|
||||
if (Char16Uuid != NULL) {
|
||||
FreePool ((VOID *)Char16Uuid);
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
if (NewFound || InfoRefresh) {
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue