From af37b660e8c3be492984ee213423f449eb5798c6 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 9 Mar 2020 23:38:27 +0900 Subject: [PATCH] [ruamoko] Push the forwarded args block This causes the block to be freed when the forward: handler returns (assuming it's not yet another builtin). This is necessary so calling a lot of forwarded messages in a loop doesn't leak memory (though it will get freed eventually). --- libs/ruamoko/rua_obj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/ruamoko/rua_obj.c b/libs/ruamoko/rua_obj.c index a88edacc0..35557b5ff 100644 --- a/libs/ruamoko/rua_obj.c +++ b/libs/ruamoko/rua_obj.c @@ -1276,6 +1276,7 @@ rua___obj_forward (progs_t *pr) P_POINTER (pr, 2) = PR_SetPointer (pr, sel); P_PACKED (pr, pr_va_list_t, 3).count = argc; P_PACKED (pr, pr_va_list_t, 3).list = PR_SetPointer (pr, argv); + PR_PushTempString (pr, args_block); PR_CallFunction (pr, imp); return; }