summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Archive/ArchiveReader.cpp2
-rw-r--r--lib/Bytecode/Archive/ArchiveReader.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp
index ac8fb11f4c..f238f59882 100644
--- a/lib/Archive/ArchiveReader.cpp
+++ b/lib/Archive/ArchiveReader.cpp
@@ -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
diff --git a/lib/Bytecode/Archive/ArchiveReader.cpp b/lib/Bytecode/Archive/ArchiveReader.cpp
index ac8fb11f4c..f238f59882 100644
--- a/lib/Bytecode/Archive/ArchiveReader.cpp
+++ b/lib/Bytecode/Archive/ArchiveReader.cpp
@@ -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