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/lib/Index/SimpleFormatContext.h | |
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/lib/Index/SimpleFormatContext.h')
-rw-r--r-- | clang/lib/Index/SimpleFormatContext.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Index/SimpleFormatContext.h b/clang/lib/Index/SimpleFormatContext.h index fde43aed211..99d0d9a1cee 100644 --- a/clang/lib/Index/SimpleFormatContext.h +++ b/clang/lib/Index/SimpleFormatContext.h @@ -51,7 +51,7 @@ public: 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); } |