diff options
author | Star Zeng <star.zeng@intel.com> | 2017-11-23 09:02:43 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2017-11-24 09:34:00 +0800 |
commit | 56fb9faa606fa72c8c10c34939bbe6da55979435 (patch) | |
tree | a400271b174df103aa61c979ef75bc9f29712c20 /MdeModulePkg/Bus/Pci/UhciPei | |
parent | d003e6b98f32467e3e80341229e51d917b4e135f (diff) | |
download | edk2-56fb9faa606fa72c8c10c34939bbe6da55979435.tar.gz edk2-56fb9faa606fa72c8c10c34939bbe6da55979435.tar.bz2 edk2-56fb9faa606fa72c8c10c34939bbe6da55979435.zip |
MdeModulePkg UhciPei: Also check TempPtr against NULL to return error
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>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus/Pci/UhciPei')
-rw-r--r-- | MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c index b7d60db0c9..482c404c0e 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;
|