summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--types.c2
-rw-r--r--vm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/types.c b/types.c
index 321392e..7bb67a6 100644
--- a/types.c
+++ b/types.c
@@ -2222,6 +2222,8 @@ ucv_gc_common(uc_vm_t *vm, bool final)
uc_value_t *val;
size_t i;
+ vm->alloc_refs = 0;
+
/* back out early if value list is uninitialized */
if (!vm->values.prev || !vm->values.next)
return;
diff --git a/vm.c b/vm.c
index 5bc071b..8512f8c 100644
--- a/vm.c
+++ b/vm.c
@@ -2502,8 +2502,6 @@ uc_vm_gc_step(uc_vm_t *vm)
else {
ucv_gc(vm);
}
-
- vm->alloc_refs = 0;
}
}