diff options
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/IScsiDxe/IScsiDriver.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c index 269c1aec5c..2249919e18 100644 --- a/NetworkPkg/IScsiDxe/IScsiDriver.c +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c @@ -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);
+ IScsiCleanAttemptVariable ();
Error5:
- IScsiCleanAttemptVariable ();
+ IScsiConfigFormUnload (gIScsiIp4DriverBinding.DriverBindingHandle);
Error4:
- FreePool (mPrivate);
+ if (mPrivate != NULL) {
+ FreePool (mPrivate);
+ mPrivate = NULL;
+ }
Error3:
gBS->UninstallMultipleProtocolInterfaces (
|