mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-26 11:07:42 +08:00
GP-2739 fix release of temporary program instance when error cond
This commit is contained in:
+6
-7
@@ -180,14 +180,13 @@ public class DWARFAnalyzer extends AbstractAnalyzer {
|
||||
return false;
|
||||
}
|
||||
|
||||
DWARFSectionProvider dsp =
|
||||
DWARFSectionProviderFactory.createSectionProviderFor(program, monitor); // closed by DWARFProgram
|
||||
if (dsp == null) {
|
||||
Msg.info(this, "Unable to find DWARF information, skipping DWARF analysis");
|
||||
return false;
|
||||
}
|
||||
try (DWARFSectionProvider dsp =
|
||||
DWARFSectionProviderFactory.createSectionProviderFor(program, monitor)) {
|
||||
if (dsp == null) {
|
||||
Msg.info(this, "Unable to find DWARF information, skipping DWARF analysis");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
try (DWARFProgram prog = new DWARFProgram(program, importOptions, monitor, dsp)) {
|
||||
if (prog.getRegisterMappings() == null && importOptions.isImportFuncs()) {
|
||||
log.appendMsg(
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ public class DWARFProgram implements Closeable {
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
sectionProvider.close();
|
||||
sectionProvider = null;
|
||||
compUnits.clear();
|
||||
debugAbbrBR = null;
|
||||
debugInfoBR = null;
|
||||
|
||||
Reference in New Issue
Block a user