projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0c3316
)
syscall_emul: Fix erroneous use of delete
author
Andreas Hansson
<andreas.hansson@arm.com>
Tue, 8 Mar 2016 22:50:58 +0000
(17:50 -0500)
committer
Andreas Hansson
<andreas.hansson@arm.com>
Tue, 8 Mar 2016 22:50:58 +0000
(17:50 -0500)
clang correctly points out an erroneous use of delete.
src/sim/syscall_emul.hh
patch
|
blob
|
history
diff --git
a/src/sim/syscall_emul.hh
b/src/sim/syscall_emul.hh
index bff7b79a43d26539f87f670cc0ae212379e571ec..2aa742615f2d18ef2ad069cfc33b2211f111f7e3 100644
(file)
--- a/
src/sim/syscall_emul.hh
+++ b/
src/sim/syscall_emul.hh
@@
-333,7
+333,7
@@
futexFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
uint8_t *buf = new uint8_t[sizeof(int)];
tc->getMemProxy().readBlob((Addr)uaddr, buf, (int)sizeof(int));
int mem_val = *((int *)buf);
- delete buf;
+ delete
[]
buf;
if (val != mem_val) {
DPRINTF(SyscallVerbose, "sys_futex: FUTEX_WAKE, read: %d, "