From 2e8b25f857bb2a1b2e16f9d488f3ddf216d79c3b Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Thu, 21 Jul 2016 13:07:00 +0800 Subject: ShellPkg/DrvDiag: Fix a critical typo bug Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Jaben Carsey Reviewed-by: Hao A Wu (cherry picked from commit cb9f3a59c390c94d5fb252c7f9b44571db90adf2) --- ShellPkg/Library/UefiShellDriver1CommandsLib/DrvDiag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvDiag.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvDiag.c index 1173f8d7be..04f6a58c3d 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvDiag.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvDiag.c @@ -123,7 +123,7 @@ DoDiagnostics ( if (ChildHandle != NULL) { ChildHandleList = AllocateZeroPool(2*sizeof(EFI_HANDLE)); - if (ChildHandleList != NULL) { + if (ChildHandleList == NULL) { SHELL_FREE_NON_NULL (ControllerHandleList); SHELL_FREE_NON_NULL (DriverHandleList); return EFI_OUT_OF_RESOURCES; -- cgit v1.2.3