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; } -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel