*fixed a memory leak with the print statement.

This commit is contained in:
Wang Renxin 2016-07-06 14:11:42 +08:00 committed by GitHub
parent 8ab140c50e
commit 8a53a948be

View File

@ -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);