From fcbc208bb3528b632d09912e447c20c5d193c00a Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 8 Mar 2016 17:50:58 -0500 Subject: [PATCH] syscall_emul: Fix erroneous use of delete clang correctly points out an erroneous use of delete. --- src/sim/syscall_emul.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, " -- 2.30.2