# std.mem.ValidationAllocator: forward free\(\) calls · gitcafe/zig

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

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

Visibility: public

Requested revision: 28eed1f7b3a8654b941960232d7c707d88649d8d

Requested commit: 28eed1f7b3a8654b941960232d7c707d88649d8d

Commit: 28eed1f7b3a8654b941960232d7c707d88649d8d

Tree: c6a46ecebdc3594ff324eec170b92572cc549a49

Author: dweiller

Committer: Andrew Kelley

## Message

```
std.mem.ValidationAllocator: forward free() calls

Failing to forward free calls to the underlying allocator makes
`ValidationAllocator` unusable for testing allocators while checking for
leaks. This change allows allocators that wrap `std.testing.allocator`
to be tested with `std.heap.testAllocator()` in test decls without
reporting erroneous leaks.

```

## Parents

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

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