diff options
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/xml/XmlWalker.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx index 34a3d8746f6b..73199b4b665d 100644 --- a/tools/source/xml/XmlWalker.cxx +++ b/tools/source/xml/XmlWalker.cxx @@ -98,12 +98,11 @@ void XmlWalker::parent() OString XmlWalker::attribute(const OString& sName) { - xmlChar* xmlName = xmlCharStrdup(sName.getStr()); - xmlChar* xmlAttribute = xmlGetProp(mpImpl->mpCurrent, xmlName); + xmlChar* xmlAttribute + = xmlGetProp(mpImpl->mpCurrent, reinterpret_cast<const xmlChar*>(sName.getStr())); OString aAttributeContent( xmlAttribute == nullptr ? "" : reinterpret_cast<const char*>(xmlAttribute)); xmlFree(xmlAttribute); - xmlFree(xmlName); return aAttributeContent; } |