When reading the symbol table, make sure to delete the ArchiveMember
authorReid Spencer <rspencer@reidspencer.com>
Fri, 12 May 2006 17:56:20 +0000 (17:56 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 12 May 2006 17:56:20 +0000 (17:56 +0000)
created by reading the symbol table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28251 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Archive/ArchiveReader.cpp
lib/Bytecode/Archive/ArchiveReader.cpp

index ac8fb11f4c03324709583d501a716cd699293db4..f238f59882eb42a715321e0c55ce61c12e428092 100644 (file)
@@ -363,6 +363,8 @@ Archive::loadSymbolTable() {
     At += mbr->getSize();
     if ((intptr_t(At) & 1) == 1)
       At++;
+    delete mbr;
+    // Can't be any more symtab headers so just advance
     FirstFile = At;
   } else {
     // There's no symbol table in the file. We have to rebuild it from scratch
index ac8fb11f4c03324709583d501a716cd699293db4..f238f59882eb42a715321e0c55ce61c12e428092 100644 (file)
@@ -363,6 +363,8 @@ Archive::loadSymbolTable() {
     At += mbr->getSize();
     if ((intptr_t(At) & 1) == 1)
       At++;
+    delete mbr;
+    // Can't be any more symtab headers so just advance
     FirstFile = At;
   } else {
     // There's no symbol table in the file. We have to rebuild it from scratch