[ASan] Fix leaks in ASan tests found by LSan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186577 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/tests/asan_test.cc b/lib/asan/tests/asan_test.cc
index 9bb474d..c87e6da 100644
--- a/lib/asan/tests/asan_test.cc
+++ b/lib/asan/tests/asan_test.cc
@@ -373,6 +373,7 @@
 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 @@
                kMallocUsableSizeErrorMsg);
   free(array);
   EXPECT_DEATH(malloc_usable_size(array), kMallocUsableSizeErrorMsg);
+  delete int_ptr;
 }
 #endif