Skip to content

Commit

Permalink
[dsymutil] Plug a memory leak.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248372 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
d0k committed Sep 23, 2015
1 parent 425f047 commit 39a9cdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/dsymutil/DwarfLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3157,7 +3157,7 @@ void DwarfLinker::loadClangModule(StringRef Filename, StringRef ModulePath,
// FIXME: At this point dsymutil should verify the DW_AT_gnu_dwo_id
// against the module hash of the clang module.

CompileUnit *Unit = nullptr;
std::unique_ptr<CompileUnit> Unit;

// Setup access to the debug info.
DWARFContextInMemory DwarfContext(*ErrOrObj);
Expand All @@ -3172,7 +3172,7 @@ void DwarfLinker::loadClangModule(StringRef Filename, StringRef ModulePath,
<< " 1 compile unit.\n";
exitDsymutil(1);
}
Unit = new CompileUnit(*CU, UnitID++, !Options.NoODR);
Unit = llvm::make_unique<CompileUnit>(*CU, UnitID++, !Options.NoODR);
Unit->setHasInterestingContent();
gatherDIEParents(CUDie, 0, *Unit, &ODRContexts.getRoot(), StringPool,
ODRContexts);
Expand Down

0 comments on commit 39a9cdb

Please sign in to comment.