diff --git a/runtime-common/core/allocator/script-allocator.h b/runtime-common/core/allocator/script-allocator.h index 80cb931ec7..2803ba8ef2 100644 --- a/runtime-common/core/allocator/script-allocator.h +++ b/runtime-common/core/allocator/script-allocator.h @@ -21,7 +21,7 @@ struct script_allocator { } constexpr void deallocate(T *p, size_t n) noexcept { - RuntimeAllocator::get().free_script_memory(p, n); + RuntimeAllocator::get().free_script_memory(p, n * sizeof(T)); } };