OPENSSL_cpuid_setup();
base_inited = 1;
+#ifndef OPENSSL_USE_NODELETE
/*
* Deliberately leak a reference to ourselves. This will force the library
* to remain loaded until the atexit() handler is run a process exit.
dso = DSO_dsobyaddr(&base_inited, DSO_FLAG_NO_UNLOAD_ON_FREE);
DSO_free(dso);
}
+#endif
return 1;
}
{
OPENSSL_INIT_STOP *newhand;
+#ifndef OPENSSL_USE_NODELETE
/*
* Deliberately leak a reference to the handler. This will force the
* library/code containing the handler to remain loaded until we run the
- * atexit handler.
+ * atexit handler. If -znodelete has been used then this is unneccessary.
*/
{
DSO *dso = NULL;
dso = DSO_dsobyaddr(handlersym.sym, DSO_FLAG_NO_UNLOAD_ON_FREE);
DSO_free(dso);
}
+#endif
newhand = OPENSSL_malloc(sizeof(*newhand));
if (newhand == NULL)