diff options
Diffstat (limited to 'NetworkPkg/IScsiDxe')
-rw-r--r-- | NetworkPkg/IScsiDxe/IScsiDriver.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c index 12095cb3ff..5a121ce9b3 100644 --- a/NetworkPkg/IScsiDxe/IScsiDriver.c +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c @@ -865,10 +865,22 @@ IScsiStart ( IScsiSessionAbort (ExistPrivate->Session);
}
- Status = IScsiCleanDriverData (ExistPrivate);
- if (EFI_ERROR (Status)) {
- goto ON_ERROR;
+ if (ExistPrivate->DevicePath != NULL) {
+ Status = gBS->UninstallProtocolInterface (
+ ExistPrivate->ExtScsiPassThruHandle,
+ &gEfiDevicePathProtocolGuid,
+ ExistPrivate->DevicePath
+ );
+ if (EFI_ERROR (Status)) {
+ goto ON_ERROR;
+ }
+
+ FreePool (ExistPrivate->DevicePath);
}
+
+ gBS->CloseEvent (ExistPrivate->ExitBootServiceEvent);
+ FreePool (ExistPrivate);
+
}
} else {
//
|