mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 19:45:21 +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>
|
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
|
* 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);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
|
xmlFreeParserCtxt(pctxt);
|
||||||
|
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
*name = nam;
|
*name = nam;
|
||||||
@ -1404,6 +1405,8 @@ virDomainParseXMLDesc(const char *xmldesc, char **name, int xendConfigVersion)
|
|||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
if (xml != NULL)
|
if (xml != NULL)
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
|
if (pctxt != NULL)
|
||||||
|
xmlFreeParserCtxt(pctxt);
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
free(ret);
|
free(ret);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user