[libcxx] r276547 - Fix memory leak in test.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 23 21:41:44 PDT 2016
Author: ericwf
Date: Sat Jul 23 23:41:44 2016
New Revision: 276547
URL: http://llvm.org/viewvc/llvm-project?rev=276547&view=rev
Log:
Fix memory leak in test.
Modified:
libcxx/trunk/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp
Modified: libcxx/trunk/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp?rev=276547&r1=276546&r2=276547&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp Sat Jul 23 23:41:44 2016
@@ -56,6 +56,8 @@ int main()
assert(Counted::count == 1);
std::destroy_at(ptr2);
assert(Counted::count == 0);
+ std::free(mem1);
+ std::free(mem2);
}
{
void* mem1 = std::malloc(sizeof(DCounted));
@@ -70,5 +72,7 @@ int main()
assert(VCounted::count == 1);
std::destroy_at(ptr2);
assert(VCounted::count == 0);
+ std::free(mem1);
+ std::free(mem2);
}
}
More information about the cfe-commits
mailing list