mirror of https://github.com/acidanthera/audk.git
NetworkPkg/IScsiDxe: Fix the incorrect error handling in DriverEntryPoint
Currently, error handling in IScsiDriverEntryPoint is incorrect. For example, if IScsiCreateAttempts() return error due to the limited max variable size, iSCSI will not unload the configuration entries. Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
This commit is contained in:
parent
ba0252808b
commit
89648826ee
|
@ -1813,7 +1813,7 @@ IScsiDriverEntryPoint (
|
|||
//
|
||||
Status = IScsiCreateKeywords (PcdGet8 (PcdMaxIScsiAttemptNumber));
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Error5;
|
||||
goto Error6;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1840,13 +1840,16 @@ IScsiDriverEntryPoint (
|
|||
return EFI_SUCCESS;
|
||||
|
||||
Error6:
|
||||
IScsiConfigFormUnload (gIScsiIp4DriverBinding.DriverBindingHandle);
|
||||
|
||||
Error5:
|
||||
IScsiCleanAttemptVariable ();
|
||||
|
||||
Error5:
|
||||
IScsiConfigFormUnload (gIScsiIp4DriverBinding.DriverBindingHandle);
|
||||
|
||||
Error4:
|
||||
FreePool (mPrivate);
|
||||
if (mPrivate != NULL) {
|
||||
FreePool (mPrivate);
|
||||
mPrivate = NULL;
|
||||
}
|
||||
|
||||
Error3:
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
|
|
Loading…
Reference in New Issue