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

Re: [libvirt] [PATCH] virsh: Call virDomainFree in cmdDomFSTrim



On 04/02/2013 09:20 AM, Michal Privoznik wrote:
> The virsh domfstrim command was not freeing allocated domain,
> leaving leaked references behind.
> ---
>  tools/virsh-domain.c | 2 ++
>  1 file changed, 2 insertions(+)

ACK.

> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 5ddcedc..5fbfeee 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -10058,6 +10058,8 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd)
>      ret = true;
>  
>  cleanup:
> +    if (dom)
> +        virDomainFree(dom);
>      return ret;
>  }
>  
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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