We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63e2e40 commit ed6d2d2Copy full SHA for ed6d2d2
1 file changed
src/p11_load.c
@@ -51,17 +51,6 @@ static void libp11_global_free()
51
#endif /* OPENSSL_VERSION_NUMBER */
52
}
53
54
-/*
55
- * Free global data if some PKCS11_CTX objects were not freed by the user
56
- */
57
-static void libp11_atexit()
58
-{
59
- if (pkcs11_global_data_refs > 0) {
60
- pkcs11_global_data_refs = 0;
61
- libp11_global_free();
62
- }
63
-}
64
-
65
/*
66
* Create a new context
67
*/
@@ -85,9 +74,7 @@ PKCS11_CTX *pkcs11_CTX_new(void)
85
74
cpriv->forkid = get_forkid();
86
75
pthread_mutex_init(&cpriv->fork_lock, 0);
87
76
88
- if(pkcs11_global_data_refs++ == 0)
89
- atexit(libp11_atexit);
90
77
+ pkcs11_global_data_refs++;
91
78
return ctx;
92
79
fail:
93
80
OPENSSL_free(cpriv);
0 commit comments