summaryrefslogtreecommitdiffstats
path: root/SourceLevelDebugPkg
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:32:27 +0800
commit6ef394ffe29bbc67038fc16ed540bfe6eed10e16 (patch)
treed6e9a38efca1035521860cbebb1293f0af9a8fa6 /SourceLevelDebugPkg
parentc9faac275bd80f34b00017ca92ce73beb0c0038f (diff)
downloadedk2-6ef394ffe29bbc67038fc16ed540bfe6eed10e16.tar.gz
edk2-6ef394ffe29bbc67038fc16ed540bfe6eed10e16.tar.bz2
edk2-6ef394ffe29bbc67038fc16ed540bfe6eed10e16.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>
Diffstat (limited to 'SourceLevelDebugPkg')
-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,