mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
Properly free the xmlDocPtr when loading pool state
Use xmlFreeDoc instead of plain xmlFree. 4 bytes in 1 blocks are definitely lost in loss record 9 of 1,084 at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x70730D6: xmlStrndup (in /usr/lib64/libxml2.so.2.9.2) by 0x701E3DC: xmlNewDoc (in /usr/lib64/libxml2.so.2.9.2) by 0x70C39F8: xmlSAX2StartDocument (in /usr/lib64/libxml2.so.2.9.2) by 0x7017245: xmlParseDocument (in /usr/lib64/libxml2.so.2.9.2) by 0x7017606: xmlDoRead (in /usr/lib64/libxml2.so.2.9.2) by 0x5309DAD: virXMLParseHelper (virxml.c:742) by 0x5367584: virStoragePoolLoadState (storage_conf.c:1863)
This commit is contained in:
parent
75d650dc5e
commit
5aa72904a7
@ -1894,7 +1894,7 @@ virStoragePoolLoadState(virStoragePoolObjListPtr pools,
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(stateFile);
|
||||
xmlFree(xml);
|
||||
xmlFreeDoc(xml);
|
||||
xmlXPathFreeContext(ctxt);
|
||||
return pool;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user