mirror of https://github.com/acidanthera/audk.git
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);
|
||||
}
|
||||
|
||||
//
|
||||
// Remove all inserted ATA devices.
|
||||
//
|
||||
DestroyDeviceInfoList(Instance);
|
||||
|
||||
if (Instance != NULL) {
|
||||
//
|
||||
// Remove all inserted ATA devices.
|
||||
//
|
||||
DestroyDeviceInfoList (Instance);
|
||||
FreePool (Instance);
|
||||
}
|
||||
return EFI_UNSUPPORTED;
|
||||
|
|
Loading…
Reference in New Issue