Skip to content

Commit 8e5114a

Browse files
committed
Add missing call to pthread_attr_destroy
Signed-off-by: Jens Reidel <[email protected]>
1 parent e2b4973 commit 8e5114a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/std/src/sys/pal/unix/thread.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ impl Thread {
7373
// on the stack size, in which case we can only gracefully return
7474
// an error here.
7575
if libc::pthread_attr_setstacksize(attr.as_mut_ptr(), stack_size) != 0 {
76+
assert_eq!(libc::pthread_attr_destroy(attr.as_mut_ptr()), 0);
7677
drop(Box::from_raw(p));
7778
return Err(io::Error::other("invalid stack size"));
7879
}

0 commit comments

Comments
 (0)