fix potential errors
authorYoungjae Shin <yj99.shin@samsung.com>
Tue, 20 Sep 2022 05:12:32 +0000 (14:12 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Tue, 20 Sep 2022 05:42:06 +0000 (14:42 +0900)
supervisor/UndoInfoParser.cpp
supervisor/XMLParser.cpp

index 1dc7851c599227e97aa4d55d233fbc3386892d39..73436ce9bb0b93ddd8b0f8f3f238336b68c033ed 100644 (file)
@@ -78,6 +78,7 @@ void UndoInfoParser::parseInfo(xmlNodePtr node,
     xmlChar *isIgnored = xmlGetProp(node, ModesXMLTag::IGNORE);
     if (MDS_EQUAL == xmlStrcmp(isIgnored, ModesXMLTag::TRUE))
         action->setIgnoreUndo(true);
+    xmlFree(isIgnored);
 
     char *nodeContent = (char *)xmlNodeGetContent(node);
     if (nullptr == nodeContent)
index f88f54edfbfd5214d5025209e117f427e40a44e4..23442b886c591f08fa73a96ce9c46107f569b2fb 100644 (file)
@@ -25,7 +25,7 @@ MODES_NAMESPACE_USE;
 
 XMLParser::XMLParser(const std::string &modeFile)
 {
-    doc = xmlParseFile(modeFile.c_str());
+    doc = xmlReadFile(modeFile.c_str(), nullptr, 0);
     if (NULL == doc) {
         ERR("xmlParseFile(%s) Fail", modeFile.c_str());
         throw ModesEx(ModesEx::INVALID_ARG);