summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2016-03-08 17:50:58 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2016-03-08 17:50:58 -0500
commitfcbc208bb3528b632d09912e447c20c5d193c00a (patch)
tree7b4fd97745f1b51881133251f23ea9dd4e99640f /src/sim/syscall_emul.hh
parentc0c3316e31436e83e960c0b0e5652da6983ed17c (diff)
downloadgem5-fcbc208bb3528b632d09912e447c20c5d193c00a.tar.xz
syscall_emul: Fix erroneous use of delete
clang correctly points out an erroneous use of delete.
Diffstat (limited to 'src/sim/syscall_emul.hh')
-rw-r--r--src/sim/syscall_emul.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index bff7b79a4..2aa742615 100644
--- 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, "