# wasm: fix double free of locals · gitcafe/zig

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

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

Visibility: public

Requested revision: 43e89026ac90ee6e8c2cb066068eb8ff10352ac1

Requested commit: 43e89026ac90ee6e8c2cb066068eb8ff10352ac1

Commit: 43e89026ac90ee6e8c2cb066068eb8ff10352ac1

Tree: 5652c5820a1649275d7b252bdd2b650ca8bd75df

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: fix double free of locals

A copy was being made of a WValue variable, which meant the call
to `free` would insert the local that was being held by said WValue
was appended to the free list twice. This led to the same local being
reused even though it wasn't free and would lead to it being over-
written by a new value.

```

## Parents

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

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