From d6f368a3f400fea3e89280262a8147e7ce5d855c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 22 Aug 2019 00:59:49 +0200 Subject: Move thread work from compiler/parser to thread_work file, fix use after free bug in multithreaded parser allocator --- src/std/arena_allocator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/std/arena_allocator.c') 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; -- cgit v1.2.3