Skip to content

Commit ad414af

Browse files
authored
Rollup merge of #148026 - joboet:dont-leak-thread-closure, r=Mark-Simulacrum
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`.
2 parents efb02eb + 36b7816 commit ad414af

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)