From a89b923ea90ed178f74df42ae344cc0a3b24380b Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Mon, 20 Nov 2017 15:30:22 +0800 Subject: [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to return error Cc: Hao Wu Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Hao Wu --- MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c index 606a53db1d..6b19362699 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c @@ -134,7 +134,7 @@ EhcInitSched ( &Map ); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status) || (Buf == NULL)) { return EFI_OUT_OF_RESOURCES; }