Reviewed-by: Star Zeng
-Original Message-
From: Wu, Hao A
Sent: Thursday, June 28, 2018 9:41 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star ; Shi, Steven ; Dong,
Eric
Subject: RE: [PATCH v2] MdeModulePkg/AtaPassThru: Add missing NULL ptr check in
BindingStart
Correction:
Should be V1 of the patch.
Best Regards,
Hao Wu
> -Original Message-
> From: Wu, Hao A
> Sent: Thursday, June 28, 2018 9:39 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A; Zeng, Star; Shi, Steven; Dong, Eric
> Subject: [PATCH v2] MdeModulePkg/AtaPassThru: Add missing NULL ptr
> check in BindingStart
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=916
>
> Within function AtaAtapiPassThruStart():
> Add missing NULL pointer check for variable 'Instance' under the
> 'ErrorExit' code logics.
>
> Cc: Star Zeng
> Cc: Steven Shi
> Cc: Eric Dong
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Hao Wu
> ---
> MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c | 9
> -
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
> b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
> index aab704bcd3..4108bafd85 100644
> --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
> +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
> @@ -827,12 +827,11 @@ ErrorExit:
> gBS->CloseEvent (Instance->TimerEvent);
>}
>
> - //
> - // Remove all inserted ATA devices.
> - //
> - DestroyDeviceInfoList(Instance);
> -
>if (Instance != NULL) {
> +//
> +// Remove all inserted ATA devices.
> +//
> +DestroyDeviceInfoList (Instance);
> FreePool (Instance);
>}
>return EFI_UNSUPPORTED;
> --
> 2.12.0.windows.1
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel