dyninst/dyninst-delete_array.patch

20 lines
571 B
Diff
Raw Normal View History

commit d4d422b792f5621e5b08e4025bd3f2d447857c0a
Author: William Cohen <wcohen@redhat.com>
Date: Tue Jul 10 09:46:31 2012 -0400
Use proper kind of delete for array object.
diff --git a/dyninstAPI/src/BPatch_flowGraph.C b/dyninstAPI/src/BPatch_flowGraph.C
index ea85413..638cfab 100644
--- a/dyninstAPI/src/BPatch_flowGraph.C
+++ b/dyninstAPI/src/BPatch_flowGraph.C
@@ -369,7 +369,7 @@ BPatch_basicBlock* BPatch_flowGraph::findBlockByAddr(Address where)
if (first <= last) {
ret = blocks[idx];
}
- delete blocks;
+ delete[] blocks;
return ret;
}