summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/IScsiDxe/IScsiMisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/IScsiDxe/IScsiMisc.c')
-rw-r--r--NetworkPkg/IScsiDxe/IScsiMisc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
index 9e4164c986..94f3725866 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -1,7 +1,7 @@
/** @file
Miscellaneous routines for iSCSI driver.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1798,8 +1798,9 @@ IScsiCleanDriverData (
}
EXIT:
-
- gBS->CloseEvent (Private->ExitBootServiceEvent);
+ if (Private->ExitBootServiceEvent != NULL) {
+ gBS->CloseEvent (Private->ExitBootServiceEvent);
+ }
mCallbackInfo->Current = NULL;
@@ -2485,8 +2486,10 @@ IScsiOnExitBootService (
ISCSI_DRIVER_DATA *Private;
Private = (ISCSI_DRIVER_DATA *) Context;
+
gBS->CloseEvent (Private->ExitBootServiceEvent);
-
+ Private->ExitBootServiceEvent = NULL;
+
if (Private->Session != NULL) {
IScsiSessionAbort (Private->Session);
}