pkcs11-tool: Call C_Finalize when a fatal error happens. (Otherwise OSX pcsc locks up)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3908 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
c6a0e54f9a
commit
e595042474
|
@ -3457,6 +3457,11 @@ static const char *p11_utf8_to_local(CK_UTF8CHAR *string, size_t len)
|
|||
|
||||
static void p11_fatal(const char *func, CK_RV rv)
|
||||
{
|
||||
if (p11)
|
||||
p11->C_Finalize(NULL_PTR);
|
||||
if (module)
|
||||
C_UnloadModule(module);
|
||||
|
||||
util_fatal("PKCS11 function %s failed: rv = %s (0x%0x)\n",
|
||||
func, CKR2Str(rv), (unsigned int) rv);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue