[lld] r239272 - COFF: Fix memory leak.
Rui Ueyama
ruiu at google.com
Sun Jun 7 17:09:25 PDT 2015
Author: ruiu
Date: Sun Jun 7 19:09:25 2015
New Revision: 239272
URL: http://llvm.org/viewvc/llvm-project?rev=239272&view=rev
Log:
COFF: Fix memory leak.
Modified:
lld/trunk/COFF/InputFiles.cpp
Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=239272&r1=239271&r2=239272&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Sun Jun 7 19:09:25 2015
@@ -187,7 +187,7 @@ std::error_code ObjectFile::initializeSy
SymbolBody *ObjectFile::createSymbolBody(StringRef Name, COFFSymbolRef Sym,
const void *AuxP, bool IsFirst) {
if (Sym.isUndefined())
- return new Undefined(Name);
+ return new (Alloc) Undefined(Name);
if (Sym.isCommon()) {
Chunk *C = new (Alloc) CommonChunk(Sym);
Chunks.push_back(C);
More information about the llvm-commits
mailing list