From fee5d547f608df205ce79d823726b616d8845cca Mon Sep 17 00:00:00 2001 From: akosik-anyvision <58490408+akosik-anyvision@users.noreply.github.com> Date: Fri, 5 Jun 2020 11:39:20 -0400 Subject: [PATCH] Change 'delete's in Relay VM Instruction dtor to 'delete[]'s (#5735) --- src/runtime/vm/vm.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/runtime/vm/vm.cc b/src/runtime/vm/vm.cc index 22102c9..42bca37 100644 --- a/src/runtime/vm/vm.cc +++ b/src/runtime/vm/vm.cc @@ -261,22 +261,22 @@ Instruction::~Instruction() { case Opcode::Fatal: return; case Opcode::AllocTensor: - delete this->alloc_tensor.shape; + delete[] this->alloc_tensor.shape; return; case Opcode::AllocADT: - delete this->datatype_fields; + delete[] this->datatype_fields; return; case Opcode::AllocClosure: - delete this->free_vars; + delete[] this->free_vars; return; case Opcode::InvokePacked: - delete this->packed_args; + delete[] this->packed_args; return; case Opcode::InvokeClosure: - delete this->closure_args; + delete[] this->closure_args; return; case Opcode::Invoke: - delete this->invoke_args_registers; + delete[] this->invoke_args_registers; return; default: std::ostringstream out; -- 2.7.4