From: Peter Krempa Date: Tue, 24 Mar 2015 13:52:11 +0000 (+0100) Subject: qemu: domain: Don't leak device alias list X-Git-Tag: v1.2.14-rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d574aa2c9d3079296ee049a3631bbcbd8f0b723;p=thirdparty%2Flibvirt.git 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) --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4838926300..758fcd9d27 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -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... */