mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-25 12:37:32 +00:00
std: don't leak the thread closure if destroying the thread attributes fails The comment about double-free is wrong – we can safely drop both the thread attributes and the thread closure. Here, I've used `DropGuard` for the attributes and moved the `Box::into_raw` to just before the `pthread_create`.