[Spice-devel] [PATCH 08/23] server/red_worker: don't push to NULL channel (called from device input)
Marc-André Lureau
marcandre.lureau at gmail.com
Sat Feb 12 11:58:48 PST 2011
I would warn in such condition. ack
On Fri, Feb 11, 2011 at 6:22 PM, Alon Levy <alevy at redhat.com> wrote:
> ---
> server/red_worker.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index e618cfa..cd02993 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -8351,13 +8351,16 @@ static void display_channel_send_item(RedChannel *base, PipeItem *pipe_item)
> default:
> red_error("invalid pipe item type");
> }
> - red_unref_channel((RedChannel *)display_channel);
> + red_unref_channel(&display_channel->common.base);
> }
>
> void red_channel_push(RedChannel *channel)
> {
> PipeItem *pipe_item;
>
> + if (!channel) {
> + return;
> + }
> if (!channel->during_send) {
> channel->during_send = TRUE;
> } else {
> --
> 1.7.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
--
Marc-André Lureau
More information about the Spice-devel
mailing list