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

Jonathon Jongsma jjongsma at redhat.com
Wed Aug 31 16:54:37 UTC 2016


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



More information about the Spice-devel mailing list