From 845daa9f12538a7ad944c7ca06766732b66ddff4 Mon Sep 17 00:00:00 2001 From: Dongyan Qian Date: Tue, 26 May 2026 11:36:27 +0800 Subject: [PATCH] NetworkPkg/DpcDxe: Stop adding entries on allocation failure DpcQueueDpc() expands the DPC entry free list when it is empty. If an allocation fails after at least one entry has already been added to the free list, the current code continues and inserts the failed allocation result into the list. Stop expanding the free list when an allocation fails and the free list already contains entries. The caller can then continue with one of the entries that was successfully allocated. Signed-off-by: Dongyan Qian --- NetworkPkg/DpcDxe/Dpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NetworkPkg/DpcDxe/Dpc.c b/NetworkPkg/DpcDxe/Dpc.c index 33eeccc7d2..ac69270151 100644 --- a/NetworkPkg/DpcDxe/Dpc.c +++ b/NetworkPkg/DpcDxe/Dpc.c @@ -145,6 +145,8 @@ DpcQueueDpc ( ReturnStatus = EFI_OUT_OF_RESOURCES; goto Done; } + + break; } //