The destruction of a mutex is done by pthread_mutex_destroy, which is a function that releases the mutex.
pthread_mutex_destroy
#include <pthread.h> int pthread_mutex_destroy(pthread_mutex_t *restrict mutex);