diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2006-11-10 23:46:12 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2006-11-10 23:46:12 +0000 |
commit | c41481197d14559cf88ca83d41239f77fe311ec6 (patch) | |
tree | a02327e62bdad5454c985c5ad51d636f2c1f2382 | |
parent | Fixed string concatenation in case where there is no lower level error (diff) | |
download | libvirt-c41481197d14559cf88ca83d41239f77fe311ec6.tar.gz libvirt-c41481197d14559cf88ca83d41239f77fe311ec6.tar.bz2 libvirt-c41481197d14559cf88ca83d41239f77fe311ec6.zip |
Fix memory leak of xml parser context
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/xml.c | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -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 @@ -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); |