We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 734576f commit 5c35135Copy full SHA for 5c35135
std/src/sys/unix/locks/pthread_mutex.rs
@@ -64,7 +64,7 @@ impl LazyInit for AllocatedMutex {
64
// We're not allowed to pthread_mutex_destroy a locked mutex,
65
// so check first if it's unlocked.
66
if unsafe { libc::pthread_mutex_trylock(mutex.0.get()) == 0 } {
67
- unsafe { libc::pthread_mutex_destroy(mutex.0.get()) };
+ unsafe { libc::pthread_mutex_unlock(mutex.0.get()) };
68
drop(mutex);
69
} else {
70
// The mutex is locked. This happens if a MutexGuard is leaked.
0 commit comments