Skip to content

Commit

Permalink
Mark as not initialized in destructor
Browse files Browse the repository at this point in the history
Set isInitialised field as false in SoftHSM::~SoftHSM() to avoid access
to NULL pointers when running callbacks registered by atexit().

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
  • Loading branch information
ansasaki committed Feb 26, 2020
1 parent 80b96a9 commit f536e8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/SoftHSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ SoftHSM::~SoftHSM()
mechanisms_table.clear();
supportedMechanisms.clear();

isInitialised = false;

resetMutexFactoryCallbacks();
}

Expand Down

0 comments on commit f536e8b

Please sign in to comment.