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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]