summaryrefslogtreecommitdiffstats
path: root/SourceLevelDebugPkg/Library
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-02-09 10:25:12 +0800
committerStar Zeng <star.zeng@intel.com>2018-02-11 10:33:35 +0800
commitb39c572e70e1f42f302c892fa22f931469eaae5e (patch)
tree928205a5094623316c2b9d3b8667a29a67b61f29 /SourceLevelDebugPkg/Library
parent7d675727fa92e5ac95dcd7fbc788927e3cb1ae22 (diff)
downloadedk2-b39c572e70e1f42f302c892fa22f931469eaae5e.tar.gz
edk2-b39c572e70e1f42f302c892fa22f931469eaae5e.tar.bz2
edk2-b39c572e70e1f42f302c892fa22f931469eaae5e.zip
SourceLevelDebugPkg DebugUsb3: Check mUsb3Instance before dereferencing it
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao Wu <hao.a.wu@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> (cherry picked from commit 6ef394ffe29bbc67038fc16ed540bfe6eed10e16)
Diffstat (limited to 'SourceLevelDebugPkg/Library')
-rw-r--r--SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
index 1582b9a8d6..29cec56f39 100644
--- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
+++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
@@ -443,7 +443,7 @@ DebugCommunicationUsb3DxeConstructor (
}
Done:
- if (mUsb3Instance->Ready && (mUsb3Instance->PciIoEvent == 0)) {
+ if ((mUsb3Instance != NULL) && mUsb3Instance->Ready && (mUsb3Instance->PciIoEvent == 0)) {
Status = Usb3NamedEventListen (
&gEfiPciIoProtocolGuid,
TPL_NOTIFY,