# arena_allocator/reset: fix use after free · gitcafe/zig

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

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

Visibility: public

Requested revision: 5d3c8f4913884a4503e9f183e471b6090bb5bc92

Requested commit: 5d3c8f4913884a4503e9f183e471b6090bb5bc92

Commit: 5d3c8f4913884a4503e9f183e471b6090bb5bc92

Tree: 5234a6c84904d8cc70e26e5690c6448f4c3665b1

Author: Erik Arvstedt

Committer: Erik Arvstedt

## Message

```
arena_allocator/reset: fix use after free

Previously, when the last buffer in `buffer_list` was retained after
deleting all other buffers, `buffer_list` wasn't updated and pointed
to a deleted buffer.

```

## Parents

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

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