summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-03-21 16:04:33 +0800
committerErik Kundiman <erik@megapahit.org>2025-03-21 19:36:44 +0800
commit2fb48eb9be6df00c3baed955fd84f4d8a1ea1d9a (patch)
treeb6ba5ff2c3ebc24477e3c6d701f91672c7499132 /indra/llxml
parent0cdb7d97f67b3a67097e56e71021cb6120ec8a8b (diff)
parent895a6739d3d02e11750e9ada72b730d02998d4c0 (diff)
Merge tag 'Second_Life_Release#895a6739-2025.03' into 2025.03
Diffstat (limited to 'indra/llxml')
-rw-r--r--indra/llxml/llxmltree.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp
index 164b3156e1..d66544d0f8 100644
--- a/indra/llxml/llxmltree.cpp
+++ b/indra/llxml/llxmltree.cpp
@@ -108,12 +108,15 @@ LLXmlTreeNode::LLXmlTreeNode( const std::string& name, LLXmlTreeNode* parent, LL
LLXmlTreeNode::~LLXmlTreeNode()
{
- attribute_map_t::iterator iter;
- for (iter=mAttributes.begin(); iter != mAttributes.end(); iter++)
- delete iter->second;
- for(LLXmlTreeNode* node : mChildren)
+ for (auto& attr : mAttributes)
+ {
+ delete attr.second;
+ }
+ mAttributes.clear();
+
+ for (auto& child : mChildren)
{
- delete node;
+ delete child;
}
mChildren.clear();
}