diff options
| -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 e2a049271d5..87f39841739 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);  }  | 
