summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2006-11-10 23:46:12 +0000
committerDaniel P. Berrange <berrange@redhat.com>2006-11-10 23:46:12 +0000
commitc41481197d14559cf88ca83d41239f77fe311ec6 (patch)
treea02327e62bdad5454c985c5ad51d636f2c1f2382
parentFixed string concatenation in case where there is no lower level error (diff)
downloadlibvirt-c41481197d14559cf88ca83d41239f77fe311ec6.tar.gz
libvirt-c41481197d14559cf88ca83d41239f77fe311ec6.tar.bz2
libvirt-c41481197d14559cf88ca83d41239f77fe311ec6.zip
Fix memory leak of xml parser context
-rw-r--r--ChangeLog4
-rw-r--r--src/xml.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f6c5230b9..bf8c29938 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Nov 10 17:53:41 EDT 2006 Daniel Berrange <berrange@redhat.com>
+
+ * src/xml.c: Fix memory leak, by freeing xmlParserContextPtr object
+
Fri Nov 10 11:19:32 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c src/xml.c: add an extra element currentMemory
diff --git a/src/xml.c b/src/xml.c
index 245066a53..7559e44b9 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -1385,6 +1385,7 @@ virDomainParseXMLDesc(const char *xmldesc, char **name, int xendConfigVersion)
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
+ xmlFreeParserCtxt(pctxt);
if (name != NULL)
*name = nam;
@@ -1404,6 +1405,8 @@ virDomainParseXMLDesc(const char *xmldesc, char **name, int xendConfigVersion)
xmlXPathFreeContext(ctxt);
if (xml != NULL)
xmlFreeDoc(xml);
+ if (pctxt != NULL)
+ xmlFreeParserCtxt(pctxt);
if (ret != NULL)
free(ret);
return (NULL);