[PATCH 01/10] Use cursor_item_ref()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]