[Spice-devel] [PATCH 23/23] use reference counting for RedPipeItem

Jonathon Jongsma jjongsma at redhat.com
Tue May 17 20:11:58 UTC 2016


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

Thanks for finishing up this cleanup

On Mon, 2016-05-16 at 14:31 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  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);


More information about the Spice-devel mailing list