diff --git a/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp b/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp --- a/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp +++ b/compiler-rt/test/memprof/TestCases/test_new_load_store.cpp @@ -35,7 +35,7 @@ for (int i = 0; i < 10; i++) j += p[i]; #ifdef FREE - delete p; + delete[] p; #endif return 0; diff --git a/compiler-rt/test/memprof/TestCases/test_terse.cpp b/compiler-rt/test/memprof/TestCases/test_terse.cpp --- a/compiler-rt/test/memprof/TestCases/test_terse.cpp +++ b/compiler-rt/test/memprof/TestCases/test_terse.cpp @@ -24,7 +24,7 @@ for (int i = 0; i < 10; i++) j += p[i]; #ifdef FREE - delete p; + delete[] p; #endif return 0;