diff --git a/sched/pthread/pthread_mutexconsistent.c b/sched/pthread/pthread_mutexconsistent.c index 0579cb3841d..3febab2d0b0 100644 --- a/sched/pthread/pthread_mutexconsistent.c +++ b/sched/pthread/pthread_mutexconsistent.c @@ -118,7 +118,8 @@ int pthread_mutex_consistent(FAR pthread_mutex_t *mutex) { /* The thread associated with the PID no longer exists */ - mutex->pid = -1; + mutex->pid = -1; + mutex->flags = 0; /* Reset the semaphore. This has the same affect as if the * dead task had called pthread_mutex_unlock().