[Spice-devel] [PATCH spice-server 1/4] Release cursor as soon as possible

Jonathon Jongsma jjongsma at redhat.com
Wed Sep 6 22:06:22 UTC 2017


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


On Wed, 2017-09-06 at 18:15 +0100, Frediano Ziglio wrote:
> Cursor resources (basically the shape of it) was retained till
> it was used however it was copied so there were no reason to not
> release
> this resource.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/cursor-channel.c | 1 -
>  server/red-worker.c     | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> index 8db3e86bc..d61cf4808 100644
> --- a/server/cursor-channel.c
> +++ b/server/cursor-channel.c
> @@ -75,7 +75,6 @@ static void cursor_pipe_item_free(RedPipeItem
> *base)
>      RedCursorPipeItem *pipe_item = SPICE_UPCAST(RedCursorPipeItem,
> base);
>  
>      cursor_cmd = pipe_item->red_cursor;
> -    red_qxl_release_resource(pipe_item->qxl, cursor_cmd-
> >release_info_ext);
>      red_put_cursor_cmd(cursor_cmd);
>      free(cursor_cmd);
>  
> diff --git a/server/red-worker.c b/server/red-worker.c
> index 675c232e7..5756bfd8c 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -112,6 +112,7 @@ static gboolean red_process_cursor_cmd(RedWorker
> *worker, const QXLCommandExt *e
>          free(cursor_cmd);
>          return FALSE;
>      }
> +    red_qxl_release_resource(worker->qxl, cursor_cmd-
> >release_info_ext);
>      cursor_channel_process_cmd(worker->cursor_channel, cursor_cmd);
>      return TRUE;
>  }


More information about the Spice-devel mailing list