From 59b03d0a94797993151bae801fcc6fdf6ec13886 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 11 Aug 2018 20:27:52 -0700 Subject: [PATCH] Fix partial application memory leak. --- src/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.c b/src/util.c index bfe25c0..8fc8218 100644 --- a/src/util.c +++ b/src/util.c @@ -291,8 +291,12 @@ libab_result libab_create_value_raw(libab* ab, libab_ref* into, } void _gc_visit_function_children(void* function, libab_visitor_function_ptr visitor, void* data) { + size_t index = 0; libab_function* func = function; libab_gc_visit(&func->scope, visitor, data); + for(; index < func->params.size; index++) { + libab_gc_visit(&func->params.data[index], visitor, data); + } } libab_result libab_create_function_internal(libab* ab, libab_ref* into,