diff options
author | Star Zeng <star.zeng@intel.com> | 2018-02-09 10:25:12 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-02-11 10:32:27 +0800 |
commit | 6ef394ffe29bbc67038fc16ed540bfe6eed10e16 (patch) | |
tree | d6e9a38efca1035521860cbebb1293f0af9a8fa6 | |
parent | c9faac275bd80f34b00017ca92ce73beb0c0038f (diff) | |
download | edk2-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>
-rw-r--r-- | SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c | 2 |
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,
|