Reviewed-by: Hao Wu
Best Regards,
Hao Wu
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star
> Zeng
> Sent: Friday, February 09, 2018 10:45 AM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu; Wu, Hao A; Zeng, Star
> Subject: [edk2] [PATCH] SourceLevelDebugPkg DebugUsb3: Check
> mUsb3Instance before dereferencing it
>
> Cc: Ruiyu Ni
> Cc: Hao Wu
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng
> ---
> .../Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
> | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun
> icationLibUsb3Dxe.c
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun
> icationLibUsb3Dxe.c
> index 1582b9a8d6de..29cec56f39dc 100644
> ---
> a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun
> icationLibUsb3Dxe.c
> +++
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommun
> icationLibUsb3Dxe.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,
> --
> 2.7.0.windows.1
>
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel