[libvirt] [PATCHv1.5 21/27] qemu: Clear old translated pool source

Michal Privoznik mprivozn at redhat.com
Wed Nov 27 11:15:02 UTC 2013


On 26.11.2013 17:49, Peter Krempa wrote:
> Clear the old data to avoid leaking it when attempting to re-translate a
> pool on the same domain object.
> ---
>  src/qemu/qemu_conf.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 58a0500..639e2ff 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:
> 

ACK

Michal




More information about the libvir-list mailing list