Inside xmlDocSetRootElement(), it checked root is null.
If root is null, it doesn't connect it's memory. So, it needs not null of root.
Then, this patch rollback to previous logic.
Change-Id: Ia291aec3a55b5d53e211de6d181df31e02cc8855
xmlNodePtr root = NULL;
xmlNodePtr cur = NULL;
- xmlDocSetRootElement(g_doc, root);
-
root = xmlNewNode(NULL, (const xmlChar*)VC_TAG_ENGINE_BASE);
if (NULL == root) {
// xmlFreeDoc(g_doc);
return -1;
}
+ xmlDocSetRootElement(g_doc, root);
iter = g_list_first(list);
while (NULL != iter) {