ANN static void fork_clean2(const VM_Shred shred, const Vector v) {
for(m_uint i = 0; i < vector_size(v); ++i) {
- VM* vm = (VM*)vector_at(v, i);
- free_gwion_cpy(vm->gwion, shred);
+ const Gwion gwion = (Gwion)vector_at(v, i);
+ free_gwion_cpy(gwion, shred);
}
vector_release(v);
}
vector_rem2(&vm->gwion->data->child, (vtype)o);
if(!vm->gwion->data->child2.ptr)
vector_init(&vm->gwion->data->child2);
- vector_add(&vm->gwion->data->child2, (vtype)ME(o)->info->vm);
+ vector_add(&vm->gwion->data->child2, (vtype)ME(o)->info->vm->gwion);
}
}
--- /dev/null
+op_already_imported.gw ==964533== Memcheck, a memory error detector
+==964533== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==964533== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
+==964533== Command: ./../../gwion -p. -m dummy -d dummy op_already_imported.gw
+==964533== Parent PID: 963027
+==964533==
+==964533==
+==964533== HEAP SUMMARY:
+==964533== in use at exit: 0 bytes in 0 blocks
+==964533== total heap usage: 869 allocs, 869 frees, 17,602,040 bytes allocated
+==964533==
+==964533== All heap blocks were freed -- no leaks are possible
+==964533==
+==964533== For lists of detected and suppressed errors, rerun with: -s
+==964533== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)