From 2f8b0435b0f9c4df8e19bbbd5df78729bfd25f09 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 9 Jun 2010 11:00:00 -0700 Subject: [PATCH] Use array delete operator to delete an array This was detected by valgrind. I think GCC still does the right thing, but the C++ spec allows the compiler to do something stupid... like crash or only delete the first entry in the array. --- ir_function_inlining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir_function_inlining.cpp b/ir_function_inlining.cpp index 7ac74ca03b6..7cc8a325ffa 100644 --- a/ir_function_inlining.cpp +++ b/ir_function_inlining.cpp @@ -411,7 +411,7 @@ ir_call::generate_inline(ir_instruction *next_ir) param_iter.next(); } - delete(parameters); + delete [] parameters; if (retval) return new ir_dereference_variable(retval); -- 2.30.2