qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] spice: fix memory leak


From: Gonglei
Subject: Re: [Qemu-devel] [PATCH v2] spice: fix memory leak
Date: Thu, 12 Feb 2015 10:14:51 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015/2/12 0:50, Gerd Hoffmann wrote:
> Found by coverity.
> 
> Signed-off-by: Gerd Hoffmann <address@hidden>
> Reviewed-by: Paolo Bonzini <address@hidden>
> ---
>  monitor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/monitor.c b/monitor.c
> index c3cc060..2c37953 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const 
> QDict *qdict,
>      if (strcmp(protocol, "spice") == 0) {
>          if (!qemu_using_spice(&err)) {
>              qerror_report_err(err);
> +            error_free(err);
>              return -1;
>          }
>  
> 
Hi, Gerd
the err variable should be initialized to NULL.

This leak had been fixed by:
http://patchwork.ozlabs.org/patch/438696/

and v2:
[PATCH v2] monitor: Fix missing err = NULL in client_migrate_info()

Regards,
-Gonglei




reply via email to

[Prev in Thread] Current Thread [Next in Thread]