void engine_table_cleanup(ENGINE_TABLE **table) { CRYPTO_THREAD_write_lock(global_engine_lock); if (*table) { lh_ENGINE_PILE_doall(&(*table)->piles, int_cleanup_cb_doall); lh_ENGINE_PILE_free(&(*table)->piles); *table = NULL; } CRYPTO_THREAD_unlock(global_engine_lock); }
void engine_table_cleanup(ENGINE_TABLE **table) { CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); if (*table) { lh_ENGINE_PILE_doall(&(*table)->piles, LHASH_DOALL_FN(int_cleanup_cb)); lh_ENGINE_PILE_free(&(*table)->piles); *table = NULL; } CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); }