I've setup the mutex functions for thread saftey using gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); but it seams the mutex_destroy function is never called. It there a function I need to call when the program is closing?