13
0

Fix a tiny memory leak, add_instant_xml() copies the node

This commit is contained in:
Robin Gareus 2018-11-29 14:25:52 +01:00
parent e42699600b
commit f443626daa
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -4210,9 +4210,9 @@ Session::save_snapshot_name (const std::string & n)
*/
instant_xml ("LastUsedSnapshot");
XMLNode* last_used_snapshot = new XMLNode ("LastUsedSnapshot");
last_used_snapshot->set_property ("name", n);
add_instant_xml (*last_used_snapshot, false);
XMLNode last_used_snapshot ("LastUsedSnapshot");
last_used_snapshot.set_property ("name", n);
add_instant_xml (last_used_snapshot, false);
}
void