[llvm] r291595 - Fix memory leak in a unit test.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 12:07:59 PST 2017
Author: ruiu
Date: Tue Jan 10 14:07:58 2017
New Revision: 291595
URL: http://llvm.org/viewvc/llvm-project?rev=291595&view=rev
Log:
Fix memory leak in a unit test.
Modified:
llvm/trunk/unittests/Support/TarWriterTest.cpp
Modified: llvm/trunk/unittests/Support/TarWriterTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TarWriterTest.cpp?rev=291595&r1=291594&r2=291595&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/TarWriterTest.cpp (original)
+++ llvm/trunk/unittests/Support/TarWriterTest.cpp Tue Jan 10 14:07:58 2017
@@ -49,7 +49,7 @@ static UstarHeader create(StringRef Base
EXPECT_TRUE((bool)TarOrErr);
std::unique_ptr<TarWriter> Tar = std::move(*TarOrErr);
Tar->append(Filename, "contents");
- Tar.release();
+ Tar.reset();
// Read the tar file.
ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr = MemoryBuffer::getFile(Path);
More information about the llvm-commits
mailing list