IScsiSessionAbort (ExistPrivate->Session);\r
}\r
\r
- Status = IScsiCleanDriverData (ExistPrivate);\r
- if (EFI_ERROR (Status)) {\r
- goto ON_ERROR;\r
+ if (ExistPrivate->DevicePath != NULL) {\r
+ Status = gBS->UninstallProtocolInterface (\r
+ ExistPrivate->ExtScsiPassThruHandle,\r
+ &gEfiDevicePathProtocolGuid,\r
+ ExistPrivate->DevicePath\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ goto ON_ERROR;\r
+ }\r
+\r
+ FreePool (ExistPrivate->DevicePath);\r
}\r
+\r
+ gBS->CloseEvent (ExistPrivate->ExitBootServiceEvent);\r
+ FreePool (ExistPrivate);\r
+\r
}\r
} else {\r
//\r