summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-03-12 04:32:05 +0200
committerGitHub <noreply@github.com>2025-03-12 04:32:05 +0200
commitb50ad90febda24d2296541f46ea1a129232aad70 (patch)
treed0c25fc032c156814b4b05c892dcfce1737508a1 /indra/llxml
parente70694e67cd1902fd2a797e24c48f08643291538 (diff)
parent8297b923f0bec459ca2bfa916cf777ac5aa3af9e (diff)
Merge pull request #3708 from secondlife/marchcat/2025.03-maint-b
2025.03 Cherry pick from Maint B
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();
}