diff options
Diffstat (limited to 'libdash/source/xml/DOMParser.cpp')
-rw-r--r-- | libdash/source/xml/DOMParser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libdash/source/xml/DOMParser.cpp b/libdash/source/xml/DOMParser.cpp index 5feb3850..c4fd2fb2 100644 --- a/libdash/source/xml/DOMParser.cpp +++ b/libdash/source/xml/DOMParser.cpp @@ -41,11 +41,11 @@ bool DOMParser::Parse (std::string path) if(xmlTextReaderRead(this->reader)) this->root = this->ProcessNode(path); + xmlFreeTextReader(this->reader); + if(this->root == NULL) return false; - xmlFreeTextReader(this->reader); - return true; } Node* DOMParser::ProcessNode (std::string path) @@ -110,6 +110,7 @@ Node* DOMParser::ProcessNode (std::string path) Node *node = new Node(); node->SetType(type); node->SetText(text); + delete text; return node; } } |