about summary refs log tree commit diff
path: root/library/std/src/sys/sync/once
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2024-07-16 14:56:18 +0000
committerChris Denton <chris@chrisdenton.dev>2024-07-17 05:57:39 +0000
commit0585c4a23ed7489ab21aa586eec4700b567cee03 (patch)
tree624a338b23616753f576084d715e5b27b8bac094 /library/std/src/sys/sync/once
parenta28b35eb35ef874d068b8a66e9ff7460fa23a672 (diff)
downloadrust-0585c4a23ed7489ab21aa586eec4700b567cee03.tar.gz
rust-0585c4a23ed7489ab21aa586eec4700b567cee03.zip
Prevent double reference in generic futex
Diffstat (limited to 'library/std/src/sys/sync/once')
-rw-r--r--library/std/src/sys/sync/once/futex.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/sync/once/futex.rs b/library/std/src/sys/sync/once/futex.rs
index 609085dcd47..8a231e65ad1 100644
--- a/library/std/src/sys/sync/once/futex.rs
+++ b/library/std/src/sys/sync/once/futex.rs
@@ -57,7 +57,7 @@ impl<'a> Drop for CompletionGuard<'a> {
         // up on the Once. `futex_wake_all` does its own synchronization, hence
         // we do not need `AcqRel`.
         if self.state.swap(self.set_state_on_drop_to, Release) == QUEUED {
-            futex_wake_all(&self.state);
+            futex_wake_all(self.state);
         }
     }
 }