Minor XML cleanups, add missing free() call

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
Lon Hohberger 2010-01-12 08:35:47 -05:00
parent cb92591c38
commit 258ed1dc00

View File

@ -221,6 +221,7 @@ domainStarted(virDomainPtr mojaDomain)
// parseXML output
doc = xmlParseMemory(xml, strlen(xml));
xmlFree(xml);
cur = xmlDocGetRootElement(doc);
if (cur == NULL) {
@ -252,17 +253,15 @@ domainStarted(virDomainPtr mojaDomain)
if (attr == NULL)
continue;
if (xmlStrcmp
(attr->children->content,
(const xmlChar *) "unix")) {
if (xmlStrcmp(attr->children->content,
(const xmlChar *) "unix")) {
continue;
}
for (serial = child->xmlChildrenNode; serial != NULL;
serial = serial->next) {
if (xmlStrcmp
(serial->name,
(const xmlChar *) "source")) {
if (xmlStrcmp(serial->name,
(const xmlChar *) "source")) {
continue;
}