Skip to content

Commit e26eeb6

Browse files
committed
Fixed memory leak if error importing XML
1 parent 9d0a93b commit e26eeb6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dialogs/ImportXMLdlg.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ void CImportXMLdlg::ImportArchive (CArchive & ar)
237237
::TMessageBox ("Not in XML format");
238238

239239
} // end of try block
240-
catch (CArchiveException* )
240+
catch (CArchiveException* e)
241241
{
242242
::TMessageBox ("There was a problem parsing the XML. "
243243
"See the error window for more details");
244+
e->Delete ();
244245

245246
}
246247
} // end of CImportXMLdlg::ImportArchive

0 commit comments

Comments
 (0)