mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
Fix memory leak of xml parser context
This commit is contained in:
parent
bb1ff5e7f8
commit
c41481197d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user