mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 13:44:33 +02:00
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 logic. Cc: Steven Shi <steven.shi@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
f6b0258d25
commit
d374f2cdf9
@ -827,12 +827,11 @@ ErrorExit:
|
|||||||
gBS->CloseEvent (Instance->TimerEvent);
|
gBS->CloseEvent (Instance->TimerEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Instance != NULL) {
|
||||||
//
|
//
|
||||||
// Remove all inserted ATA devices.
|
// Remove all inserted ATA devices.
|
||||||
//
|
//
|
||||||
DestroyDeviceInfoList (Instance);
|
DestroyDeviceInfoList (Instance);
|
||||||
|
|
||||||
if (Instance != NULL) {
|
|
||||||
FreePool (Instance);
|
FreePool (Instance);
|
||||||
}
|
}
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user