You've already forked opencryptoki
mirror of
https://github.com/opencryptoki/opencryptoki.git
synced 2026-10-28 18:37:25 +03:00
Closing spin lock file descriptor during SC_Finalize to prevent leaks on
repeated C_Initialize/C_Finalize calls.
This commit is contained in:
@@ -756,6 +756,9 @@ CK_RV SC_Finalize( CK_SLOT_ID sid )
|
||||
session_mgr_close_all_sessions();
|
||||
object_mgr_purge_token_objects();
|
||||
detach_shm();
|
||||
// close spin lock file
|
||||
if (spin_created)
|
||||
close(spinxplfd);
|
||||
if ( token_specific.t_final != NULL) {
|
||||
token_specific.t_final();
|
||||
}
|
||||
|
||||
@@ -549,6 +549,9 @@ CK_RV SC_Finalize( CK_SLOT_ID sid )
|
||||
object_mgr_purge_token_objects();
|
||||
|
||||
detach_shm();
|
||||
// close spin lock file
|
||||
if (spin_created)
|
||||
close(spinxplfd);
|
||||
if ( token_specific.t_final != NULL) {
|
||||
token_specific.t_final();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user