aboutsummaryrefslogtreecommitdiff
path: root/src/std/arena_allocator.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-22 00:59:49 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitd6f368a3f400fea3e89280262a8147e7ce5d855c (patch)
tree4eb64eb0d18dad1e40c70a5bff974fe8033fe389 /src/std/arena_allocator.c
parentdf640dc7f55fef962b598562e10d8dd4d60fedc0 (diff)
Move thread work from compiler/parser to thread_work file, fix use after free bug in multithreaded parser allocator
Diffstat (limited to 'src/std/arena_allocator.c')
-rw-r--r--src/std/arena_allocator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/std/arena_allocator.c b/src/std/arena_allocator.c
index 4934925..11fb40d 100644
--- a/src/std/arena_allocator.c
+++ b/src/std/arena_allocator.c
@@ -32,10 +32,8 @@ int arena_allocator_init(ArenaAllocator *self) {
}
static void arena_allocator_deinit_buffers(ArenaAllocator *self) {
- void **mem;
- void **mems_end;
- mem = buffer_begin(&self->mems);
- mems_end = buffer_end(&self->mems);
+ void **mem = buffer_begin(&self->mems);
+ void **mems_end = buffer_end(&self->mems);
while(mem != mems_end) {
am_free(*mem);
++mem;