[Spice-devel] [PATCH v2 2/9] worker: do not leak cursor after disconnecting clients

Pavel Grunt pgrunt at redhat.com
Tue Jan 26 02:34:58 PST 2016


Hi,

On Tue, 2016-01-26 at 09:44 +0000, Frediano Ziglio wrote:
> This also prevents future use of a NULL pointer.
> 
Can this happen now? Is it related to the PATCH 5/9 - function
cursor_is_connected() ?

Pavel

> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/red-worker.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/server/red-worker.c b/server/red-worker.c
> index 9a392ec..dd293f7 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -455,7 +455,6 @@ static void flush_cursor_commands(RedWorker
> *worker)
>              if (spice_get_monotonic_time_ns() >= end_time) {
>                  spice_warning("flush cursor timeout");
>                  cursor_channel_disconnect(worker->cursor_channel);
> -                worker->cursor_channel = NULL;
>              } else {
>                  sleep_count++;
>                  usleep(DISPLAY_CLIENT_RETRY_INTERVAL);


More information about the Spice-devel mailing list