From: Peter Krempa Date: Mon, 25 Nov 2013 15:12:54 +0000 (+0100) Subject: qemu: Clear old translated pool source X-Git-Tag: CVE-2013-6436~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdeb0f01239ad6b8acf1f24ce9f199c2d0682c06;p=thirdparty%2Flibvirt.git qemu: Clear old translated pool source Clear the old data to avoid leaking it when attempting to re-translate a pool on the same domain object. --- diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 36493bac92..44e4320ef7 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1360,6 +1360,10 @@ qemuTranslateDiskSourcePool(virConnectPtr conn, goto cleanup; } + VIR_FREE(def->src); + virDomainDiskHostDefFree(def->nhosts, def->hosts); + virDomainDiskAuthClear(def); + switch ((enum virStoragePoolType) pooldef->type) { case VIR_STORAGE_POOL_DIR: case VIR_STORAGE_POOL_FS: