[libvirt] [PATCH] Fix memory leak in virsh

Eric Blake eblake at redhat.com
Wed Dec 22 15:48:37 UTC 2010


On 12/22/2010 12:12 AM, Hu Tao wrote:
> ---
>  tools/virsh.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 4e37f2d..8c123bb 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -10935,8 +10935,10 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser)
>  
>              if (tk == VSH_TK_ERROR)
>                  goto syntaxError;
> -            if (tk != VSH_TK_ARG)
> +            if (tk != VSH_TK_ARG) {
> +                VIR_FREE(tkdata);
>                  break;
> +            }

ACK, and pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list