From 6b6f2892b7e4f02738aeaaccccf562aad5c892a9 Mon Sep 17 00:00:00 2001 From: dzaima Date: Tue, 7 Jun 2022 18:47:13 +0300 Subject: [PATCH] free error message object --- src/vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vm.c b/src/vm.c index 985157af..4eeadac8 100644 --- a/src/vm.c +++ b/src/vm.c @@ -1211,7 +1211,9 @@ NOINLINE void vm_printPos(Comp* comp, i32 bcPos, i64 pos) { if (CATCH) goto native_print; B s = emptyCVec(); - fprintRaw(stderr, vm_fmtPoint(src, s, comp->path, cs, ce)); + B msg = vm_fmtPoint(src, s, comp->path, cs, ce); + fprintRaw(stderr, msg); + dec(msg); fputc('\n', stderr); popCatch(); return;