static void ossl_init_thread_stop(struct thread_local_inits_st *locals) { /* Can't do much about this */ if (locals == NULL) return; if (locals->async) { #ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: " "ASYNC_cleanup_thread()\n"); #endif ASYNC_cleanup_thread(); } if (locals->err_state) { #ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: " "ERR_remove_thread_state(NULL)\n"); #endif ERR_remove_thread_state(NULL); } OPENSSL_free(locals); ossl_init_thread_stop_cleanup(); }
void ASYNC_cleanup(int cleanupthread) { /* * We don't actually have any global cleanup at the moment so just cleanup * the thread */ if (cleanupthread) ASYNC_cleanup_thread(); }