Re: [PATCH] server/inputs_channel: fix test_display_no_ssl segfault on client disconnect when keyboard never initialized

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

 



ack

----- Original Message -----
> From: Alon Levy <alon@xxxxxxxxx>
> 
> ---
>  server/inputs_channel.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/server/inputs_channel.c b/server/inputs_channel.c
> index b0ba1d6..99e82ae 100644
> --- a/server/inputs_channel.c
> +++ b/server/inputs_channel.c
> @@ -483,7 +483,12 @@ static int inputs_channel_handle_parsed(RedChannelClient
> *rcc, uint32_t size, ui
>  static void inputs_release_keys(void)
>  {
>      int i;
> -    SpiceKbdState *st = keyboard->st;
> +    SpiceKbdState *st;
> +
> +    if (!keyboard) {
> +        return;
> +    }
> +    st = keyboard->st;
>  
>      for (i = 0; i < SPICE_N_ELEMENTS(st->key); i++) {
>          if (!st->key[i])
> --
> 2.1.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]