G_GNUC_INTERNAL void spice_msg_out_unref(spice_msg_out *out) { g_return_if_fail(out != NULL); out->refcount--; if (out->refcount > 0) return; spice_marshaller_destroy(out->marshaller); free(out); }
static void snd_disconnect_channel(SndChannel *channel) { SndWorker *worker; if (!channel) { spice_debug("not connected"); return; } spice_debug("%p", channel); worker = channel->worker; if (channel->stream) { channel->cleanup(channel); red_channel_client_disconnect(worker->connection->channel_client); core->watch_remove(channel->stream->watch); channel->stream->watch = NULL; reds_stream_free(channel->stream); channel->stream = NULL; spice_marshaller_destroy(channel->send_data.marshaller); } snd_channel_put(channel); worker->connection = NULL; }