public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg UhciPei: Also check TempPtr against NULL to return error
@ 2017-11-23  1:04 Star Zeng
  2017-11-23  1:10 ` Wu, Hao A
  0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2017-11-23  1:04 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Hao Wu, Jiewen Yao

Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
index b7d60db0c94e..482c404c0eae 100644
--- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
+++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
@@ -2863,8 +2863,8 @@ CreateMemoryBlock (
              &MappedAddr,
              &Mapping
              );
-  if (EFI_ERROR (Status)) {
-    return Status;
+  if (EFI_ERROR (Status) || (TempPtr == NULL)) {
+    return EFI_OUT_OF_RESOURCES;
   }
 
   Ptr = TempPtr;
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-23  1:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23  1:04 [PATCH] MdeModulePkg UhciPei: Also check TempPtr against NULL to return error Star Zeng
2017-11-23  1:10 ` Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox