[ELF] Don't leak the ".data" section. Fixes an asan failure.

llvm-svn: 286193
This commit is contained in:
Davide Italiano 2016-11-08 01:42:38 +00:00
parent f95e706371
commit 089f0e7488

View File

@ -820,7 +820,7 @@ template <class ELFT> void BinaryFile::parse() {
StringRef SizeName = Saver.save(Twine(Filename) + "_size");
auto *Section =
new InputSection<ELFT>(SHF_ALLOC, SHT_PROGBITS, 8, Data, ".data");
make<InputSection<ELFT>>(SHF_ALLOC, SHT_PROGBITS, 8, Data, ".data");
Sections.push_back(Section);
elf::Symtab<ELFT>::X->addRegular(StartName, STV_DEFAULT, Section, STB_GLOBAL,