RedfishPkg/RedfishHttpDxe: Improve RedfishHttpOperation error handling

Improve RedfishHttpOperation error handling by
returning EFI_DEVICE_ERROR if CreateRedfishPayload
is NULL

Cc: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Signed-off-by: Matthew Graham <Matthew.Graham@amd.com>
This commit is contained in:
Matthew Graham 2026-04-14 15:38:33 -05:00 committed by mergify[bot]
parent 3449c60bab
commit 112a43a92d

View file

@ -587,6 +587,9 @@ ParseResponseMessage (
RedfishResponse->Payload = CreateRedfishPayload (ServicePrivate, JsonData);
if (RedfishResponse->Payload == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Failed to create payload\n.", __func__));
JsonValueFree (JsonData);
Status = EFI_DEVICE_ERROR;
goto ON_ERROR;
}
JsonValueFree (JsonData);