diff options
Diffstat (limited to 'compiler-rt/lib/asan/tests/asan_test.cc')
| -rw-r--r-- | compiler-rt/lib/asan/tests/asan_test.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/tests/asan_test.cc b/compiler-rt/lib/asan/tests/asan_test.cc index 9bb474dd358..c87e6da5864 100644 --- a/compiler-rt/lib/asan/tests/asan_test.cc +++ b/compiler-rt/lib/asan/tests/asan_test.cc @@ -373,6 +373,7 @@ TEST(AddressSanitizer, ReallocFreedPointerTest) { TEST(AddressSanitizer, ReallocInvalidPointerTest) { void *ptr = Ident(malloc(42)); EXPECT_DEATH(ptr = realloc((int*)ptr + 1, 77), "attempting free.*not malloc"); + free(ptr); } TEST(AddressSanitizer, ZeroSizeMallocTest) { @@ -411,6 +412,7 @@ TEST(AddressSanitizer, MallocUsableSizeTest) { kMallocUsableSizeErrorMsg); free(array); EXPECT_DEATH(malloc_usable_size(array), kMallocUsableSizeErrorMsg); + delete int_ptr; } #endif |

