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