From 6a8520faa6932512f20f56197303e66d3b435bd9 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 10 Jan 2017 20:07:58 +0000 Subject: Fix memory leak in a unit test. llvm-svn: 291595 --- llvm/unittests/Support/TarWriterTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/unittests/Support/TarWriterTest.cpp') diff --git a/llvm/unittests/Support/TarWriterTest.cpp b/llvm/unittests/Support/TarWriterTest.cpp index dfcf88f16ae..4a088835d1c 100644 --- a/llvm/unittests/Support/TarWriterTest.cpp +++ b/llvm/unittests/Support/TarWriterTest.cpp @@ -49,7 +49,7 @@ static UstarHeader create(StringRef Base, StringRef Filename) { EXPECT_TRUE((bool)TarOrErr); std::unique_ptr Tar = std::move(*TarOrErr); Tar->append(Filename, "contents"); - Tar.release(); + Tar.reset(); // Read the tar file. ErrorOr> MBOrErr = MemoryBuffer::getFile(Path); -- cgit v1.2.3