projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfb3536
)
Use array delete operator to delete an array
author
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 9 Jun 2010 18:00:00 +0000
(11:00 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 9 Jun 2010 18:00:23 +0000
(11:00 -0700)
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
patch
|
blob
|
history
diff --git
a/ir_function_inlining.cpp
b/ir_function_inlining.cpp
index 7ac74ca03b6235775162b76d1531a8169f10dd56..7cc8a325ffa9c1aaeb6a41347c2c7477766218a0 100644
(file)
--- 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);