[Spice-devel] [PATCH 01/10] Use cursor_item_ref()

Victor Toso lists at victortoso.com
Wed Aug 31 19:23:32 UTC 2016


Hi,

On Wed, Aug 31, 2016 at 11:54:37AM -0500, Jonathon Jongsma wrote:
> Use the existing function rather than incrementing the ref directly.
> ---
>  server/cursor-channel.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> index 1e753c7..cb3aa49 100644
> --- a/server/cursor-channel.c
> +++ b/server/cursor-channel.c
> @@ -141,8 +141,7 @@ static RedPipeItem *new_cursor_pipe_item(RedChannelClient *rcc, void *data, int
>  
>      red_pipe_item_init_full(&item->base, RED_PIPE_ITEM_TYPE_CURSOR,
>                              cursor_pipe_item_free);
> -    item->cursor_item = data;
> -    item->cursor_item->refs++;
> +    item->cursor_item = cursor_item_ref(data);
>      return &item->base;

Acked-by: Victor Toso <victortoso at redhat.com>

>  }
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list