You don't need to allocate pthread_mutex_t instances on heap, you can include them into the struct directly -
struct foo
{
pthread_mutex_t bar;
...
}; struct foo
{
pthread_mutex_t bar;
...
};