summaryrefslogtreecommitdiff
path: root/tools/llvm-objdump
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-21 04:01:19 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-21 04:01:19 +0000
commitb5b8d20ddd287992ee286bf5f4d059fd527823ad (patch)
tree466884156a2231e50129bc0ff0fa361a45417acd /tools/llvm-objdump
parente55e64f01af6c53917db7556d25e4717ca975dad (diff)
downloadllvm-b5b8d20ddd287992ee286bf5f4d059fd527823ad.tar.gz
llvm-b5b8d20ddd287992ee286bf5f4d059fd527823ad.tar.bz2
llvm-b5b8d20ddd287992ee286bf5f4d059fd527823ad.tar.xz
llvm-objdump: Fix use after free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump')
-rw-r--r--tools/llvm-objdump/MachODump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp
index 7e3bb20d3e..0daf9d4214 100644
--- a/tools/llvm-objdump/MachODump.cpp
+++ b/tools/llvm-objdump/MachODump.cpp
@@ -346,11 +346,11 @@ void llvm::DisassembleInputMachO(StringRef Filename) {
StringRef DebugAbbrevSection, DebugInfoSection, DebugArangesSection,
DebugLineSection, DebugStrSection;
OwningPtr<DIContext> diContext;
+ OwningPtr<MachOObject> DSYMObj;
// Try to find debug info and set up the DIContext for it.
if (UseDbg) {
ArrayRef<Section> DebugSections = Sections;
std::vector<Section> DSYMSections;
- OwningPtr<MachOObject> DSYMObj;
// A separate DSym file path was specified, parse it as a macho file,
// get the sections and supply it to the section name parsing machinery.