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

Eric Blake eblake at redhat.com
Tue Apr 2 15:29:35 UTC 2013


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130402/79cb24ad/attachment-0001.sig>


More information about the libvir-list mailing list