From 8a53a948be635ef47229da1aa11ac927ccd6c45c Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Wed, 6 Jul 2016 14:11:42 +0800 Subject: [PATCH] *fixed a memory leak with the print statement. --- core/my_basic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/my_basic.c b/core/my_basic.c index f242670..bc4105c 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -15726,6 +15726,8 @@ static int _std_print(mb_interpreter_t* s, void** l) { case _DT_FUNC: /* Fall through */ case _DT_ROUTINE: result = _calc_expression(s, &ast, &val_ptr); + _REF(val_ptr); + _UNREF(val_ptr); _print: if(val_ptr->type == _DT_NIL) { _get_printer(s)(MB_NIL);