Skip to content

Commit 7b35548

Browse files
committed
Fixed memory leak on loading state files
1 parent f1b12cc commit 7b35548

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xml/xml_load_world.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2342,10 +2342,11 @@ void CMUSHclientDoc::Load_Plugin_XML (CXMLelement & parent)
23422342
} // end of not archive
23432343
} // end of try
23442344

2345-
catch(CFileException*)
2345+
catch(CFileException* e)
23462346
{
23472347
// silently ignore no state file :)
23482348
// HandleLoadException ("plugin state file not found, assuming empty", e);
2349+
e->Delete ();
23492350
}
23502351

23512352
catch(CException*)

0 commit comments

Comments
 (0)