diff options
Diffstat (limited to 'libglusterfs/src')
| -rw-r--r-- | libglusterfs/src/syncop.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index 4e3c93a45f8..f58bfcecab4 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -179,9 +179,10 @@ synctask_destroy (struct synctask *task)          if (task->opframe)                  STACK_DESTROY (task->opframe->root); -        pthread_mutex_destroy (&task->mutex); - -        pthread_cond_destroy (&task->cond); +        if (task->synccbk == NULL) { +               pthread_mutex_destroy (&task->mutex); +               pthread_cond_destroy (&task->cond); +        }          FREE (task);  }  | 
