summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ckcapi-session.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ckcapi-session.c b/ckcapi-session.c
index 0d71fe2..dc5b976 100644
--- a/ckcapi-session.c
+++ b/ckcapi-session.c
@@ -347,6 +347,9 @@ ckcapi_session_close_all(CK_SLOT_ID slot)
DBG(("closing all sessions for: %d", slot));
+ if(!all_sessions)
+ return CKR_OK;
+
ckcapi_lock_global();
sessions = ckcapi_array_sized_new(0, 1, sizeof(CkCapiSession*),