diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2014-04-24 04:58:41 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2014-04-24 04:58:41 +0000 |
| commit | dbd07fadae4701ff2fec6fbee38dbedc1625290d (patch) | |
| tree | 485a51d62dcfc4b9b16e2c1f8dc8b8352183e8e5 /clang/unittests/Tooling | |
| parent | 4fcf0c7b29cf1603eee6c103f71c1a6b2f833dfc (diff) | |
| download | bcm5719-llvm-dbd07fadae4701ff2fec6fbee38dbedc1625290d.tar.gz bcm5719-llvm-dbd07fadae4701ff2fec6fbee38dbedc1625290d.zip | |
Fix two leaks found by LSan (one is test-only).
The result of llvm::MemoryBuffer::getMemBuffer() needs to be freed. Don't
pass "don't free" flag to overrideFileContents() to fix.
llvm-svn: 207075
Diffstat (limited to 'clang/unittests/Tooling')
| -rw-r--r-- | clang/unittests/Tooling/RewriterTestContext.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/Tooling/RewriterTestContext.h b/clang/unittests/Tooling/RewriterTestContext.h index a1bb2311c55..f02ba1a9ffb 100644 --- a/clang/unittests/Tooling/RewriterTestContext.h +++ b/clang/unittests/Tooling/RewriterTestContext.h @@ -52,7 +52,7 @@ class RewriterTestContext { llvm::MemoryBuffer::getMemBuffer(Content); const FileEntry *Entry = Files.getVirtualFile(Name, Source->getBufferSize(), 0); - Sources.overrideFileContents(Entry, Source, true); + Sources.overrideFileContents(Entry, Source); assert(Entry != NULL); return Sources.createFileID(Entry, SourceLocation(), SrcMgr::C_User); } |

