# Free threads in std.Thread.Pool.init only with pool.join · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3331c5e7af28bd2ee56a1080a1829e3fb6747f60)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3331c5e7af28bd2ee56a1080a1829e3fb6747f60

Requested commit: 3331c5e7af28bd2ee56a1080a1829e3fb6747f60

Commit: 3331c5e7af28bd2ee56a1080a1829e3fb6747f60

Tree: 33b986b876fb5fc93e3e9609bc07bdd2d317c250

Author: Littleote

Committer: Andrew Kelley

## Message

```
Free threads in std.Thread.Pool.init only with pool.join

Free the allocated threads in the initialization of a thread pool only with pool.join instead of additionally calling allocator.free causing free to be called twice.

Resolves #18643
```

## Parents

- [d0da3d731e40fe9e0b45d50d4c3bf8210b44d472](https://git.cafe/gitcafe/zig/commit/d0da3d731e40fe9e0b45d50d4c3bf8210b44d472?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3331c5e7af28bd2ee56a1080a1829e3fb6747f60?format=markdown)
