qemu: domain: Don't leak device alias list

While adding tests for status XML parsing and formatting I've noticed
that the device alias list is leaked.

==763001== 81 (48 direct, 33 indirect) bytes in 1 blocks are definitely lost in loss record 414 of 514
==763001==    at 0x4C2B8F0: calloc (vg_replace_malloc.c:623)
==763001==    by 0x6ACF70F: virAllocN (viralloc.c:191)
==763001==    by 0x447B64: qemuDomainObjPrivateXMLParse (qemu_domain.c:727)
==763001==    by 0x6B848F9: virDomainObjParseXML (domain_conf.c:15491)
==763001==    by 0x6B84CAC: virDomainObjParseNode (domain_conf.c:15608)
This commit is contained in:
Peter Krempa 2015-03-24 14:52:11 +01:00
parent 49bf09d16c
commit 9d574aa2c9

View File

@ -444,6 +444,7 @@ qemuDomainObjPrivateFree(void *data)
VIR_FREE(priv->origname);
virCondDestroy(&priv->unplugFinished);
virStringFreeList(priv->qemuDevices);
virChrdevFree(priv->devs);
/* This should never be non-NULL if we get here, but just in case... */