[Lldb-commits] [PATCH] D130655: [LLDB][NFC] Fix possible resource leak
Slava Gurevich via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 27 12:02:44 PDT 2022
fixathon created this revision.
fixathon added reviewers: clayborg, aadsm, alvinhochun.
Herald added a project: All.
fixathon requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
SymbolVendorPECOFF object is leaked on early return at line 110
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130655
Files:
lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp
Index: lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp
===================================================================
--- lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp
+++ lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp
@@ -102,8 +102,6 @@
// 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 *symbol_vendor = new SymbolVendorPECOFF(module_sp);
symbol_vendor->AddSymbolFileRepresentation(dsym_objfile_sp);
return symbol_vendor;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130655.448120.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220727/8d4c167a/attachment.bin>
More information about the lldb-commits
mailing list