Signed-off-by: Mike Maslenkin <mike.maslen...@gmail.com> --- .../RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c index f71b12e4b5e0..d9aa6e1a8145 100644 --- a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c +++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c @@ -331,6 +331,12 @@ NewInternalInstance ( } NewInternalData->NodeName = AllocateZeroPool (StrSize (NodeName)); + if (NewInternalData->NodeName == NULL) { + DEBUG ((DEBUG_ERROR, "%a: No memory for NodeName\n", __func__)); + FreePool (NewInternalData); + return EFI_OUT_OF_RESOURCES; + } + StrnCpyS (NewInternalData->NodeName, StrLen (NodeName) + 1, (CONST CHAR16 *)NodeName, StrLen (NodeName)); NewInternalData->SiblingList = NULL; NewInternalData->ChildList = NULL; -- 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110156): https://edk2.groups.io/g/devel/message/110156 Mute This Topic: https://groups.io/mt/102211780/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-