diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/unix/locks/pthread_mutex.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/locks/pthread_mutex.rs b/library/std/src/sys/unix/locks/pthread_mutex.rs index a1155a808aa..8a78bc1fd73 100644 --- a/library/std/src/sys/unix/locks/pthread_mutex.rs +++ b/library/std/src/sys/unix/locks/pthread_mutex.rs @@ -64,7 +64,7 @@ impl LazyInit for AllocatedMutex { // We're not allowed to pthread_mutex_destroy a locked mutex, // so check first if it's unlocked. if unsafe { libc::pthread_mutex_trylock(mutex.0.get()) == 0 } { - unsafe { libc::pthread_mutex_destroy(mutex.0.get()) }; + unsafe { libc::pthread_mutex_unlock(mutex.0.get()) }; drop(mutex); } else { // The mutex is locked. This happens if a MutexGuard is leaked. |
