[PATCH 23/23] use reference counting for RedPipeItem

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

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/red-channel.c | 2 +-
 server/spicevmc.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/red-channel.c b/server/red-channel.c
index 803570c..9aef363 100644
--- a/server/red-channel.c
+++ b/server/red-channel.c
@@ -578,7 +578,7 @@ static void red_channel_client_send_item(RedChannelClient *rcc, RedPipeItem *ite
             rcc->channel->channel_cbs.send_item(rcc, item);
             return;
     }
-    free(item);
+    red_pipe_item_unref(item);
 }
 
 static inline void red_channel_client_release_sent_item(RedChannelClient *rcc)
diff --git a/server/spicevmc.c b/server/spicevmc.c
index 1e9406e..14d34b4 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -431,7 +431,7 @@ static void spicevmc_red_channel_send_item(RedChannelClient *rcc,
         break;
     default:
         spice_error("bad pipe item %d", item->type);
-        free(item);
+        red_pipe_item_unref(item);
         return;
     }
     red_channel_client_begin_send_message(rcc);
-- 
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]