[LLDB][NFC] Fix possible resource leak
SymbolVendorPECOFF object is leaked on early return at line 110 Differential Revision: https://reviews.llvm.org/D130655
This commit is contained in:
parent
89d3c9634b
commit
2cfcbe295a
|
@ -102,8 +102,6 @@ SymbolVendorPECOFF::CreateInstance(const lldb::ModuleSP &module_sp,
|
|||
// This objfile is for debugging purposes.
|
||||
dsym_objfile_sp->SetType(ObjectFile::eTypeDebugInfo);
|
||||
|
||||
SymbolVendorPECOFF *symbol_vendor = new SymbolVendorPECOFF(module_sp);
|
||||
|
||||
// Get the module unified section list and add our debug sections to
|
||||
// that.
|
||||
SectionList *module_section_list = module_sp->GetSectionList();
|
||||
|
@ -132,6 +130,7 @@ SymbolVendorPECOFF::CreateInstance(const lldb::ModuleSP &module_sp,
|
|||
}
|
||||
}
|
||||
|
||||
SymbolVendorPECOFF *symbol_vendor = new SymbolVendorPECOFF(module_sp);
|
||||
symbol_vendor->AddSymbolFileRepresentation(dsym_objfile_sp);
|
||||
return symbol_vendor;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue