If DpcEntry is NULL, it means it failed to be allocated space. ReturnStatus should be EFI_OUT_OF_RESOURCES regardless of the content of mDpcEntryFreeList.
Cc: Siyuan Fu <siyuan...@intel.com> Cc: Jiaxin Wu <jiaxin...@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zh...@intel.com> --- NetworkPkg/DpcDxe/Dpc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/NetworkPkg/DpcDxe/Dpc.c b/NetworkPkg/DpcDxe/Dpc.c index 8a490949dc8c..ebdb978b254a 100644 --- a/NetworkPkg/DpcDxe/Dpc.c +++ b/NetworkPkg/DpcDxe/Dpc.c @@ -137,14 +137,11 @@ DpcQueueDpc ( gBS->RaiseTPL (TPL_HIGH_LEVEL); // - // If the allocation of a DPC entry fails, and the free list is empty, - // then return EFI_OUT_OF_RESOURCES. + // If the allocation of a DPC entry fails, return EFI_OUT_OF_RESOURCES. // if (DpcEntry == NULL) { - if (IsListEmpty (&mDpcEntryFreeList)) { - ReturnStatus = EFI_OUT_OF_RESOURCES; - goto Done; - } + ReturnStatus = EFI_OUT_OF_RESOURCES; + goto Done; } // -- 2.18.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48862): https://edk2.groups.io/g/devel/message/48862 Mute This Topic: https://groups.io/mt/34508854/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-