[llvm] r225721 - IR: Fix unit test memory leak reported by ASan
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Jan 12 14:46:15 PST 2015
Author: dexonsmith
Date: Mon Jan 12 16:46:15 2015
New Revision: 225721
URL: http://llvm.org/viewvc/llvm-project?rev=225721&view=rev
Log:
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!
Modified:
llvm/trunk/unittests/IR/MetadataTest.cpp
Modified: llvm/trunk/unittests/IR/MetadataTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/MetadataTest.cpp?rev=225721&r1=225720&r2=225721&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/MetadataTest.cpp (original)
+++ llvm/trunk/unittests/IR/MetadataTest.cpp Mon Jan 12 16:46:15 2015
@@ -314,6 +314,7 @@ TEST_F(MDNodeTest, handleChangedOperandR
Metadata *Ops3[] = {N2};
MDNode *N3 = MDNode::get(Context, Ops3);
Temp3->replaceAllUsesWith(N3);
+ delete Temp3;
// !4 = !{!1}
Metadata *Ops4[] = {N1};
More information about the llvm-commits
mailing list