From ab0c5259e5a3238e176e4b1aed942f5384a2d0c6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 18 Sep 2019 13:33:05 +0200 Subject: Fix leak on parse failure --- src/std/arena_allocator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/std') diff --git a/src/std/arena_allocator.c b/src/std/arena_allocator.c index 8b0083d..5e49035 100644 --- a/src/std/arena_allocator.c +++ b/src/std/arena_allocator.c @@ -102,8 +102,7 @@ int arena_allocator_alloc(ArenaAllocator *self, usize size, void **mem) { } int arena_allocator_add_mem(ArenaAllocator *self, usize *result_index) { - void *null_data; - null_data = NULL; + void *null_data = NULL; *result_index = self->mems.size; return buffer_append(&self->mems, &null_data, sizeof(void*)); } -- cgit v1.2.3