From 5e3ba22b3a31f0d9e9f2ec8fcc3e44855a45308c Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 12 Jan 2015 22:46:15 +0000 Subject: [PATCH] IR: Fix unit test memory leak reported by ASan http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/603/steps/check-llvm%20asan/logs/stdio Thanks Alexey for pointing me to this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225721 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/IR/MetadataTest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/unittests/IR/MetadataTest.cpp b/unittests/IR/MetadataTest.cpp index c86fdd4f923..af110742dd7 100644 --- a/unittests/IR/MetadataTest.cpp +++ b/unittests/IR/MetadataTest.cpp @@ -314,6 +314,7 @@ TEST_F(MDNodeTest, handleChangedOperandRecursion) { Metadata *Ops3[] = {N2}; MDNode *N3 = MDNode::get(Context, Ops3); Temp3->replaceAllUsesWith(N3); + delete Temp3; // !4 = !{!1} Metadata *Ops4[] = {N1}; -- 2.34.1