[Spice-devel] [PATCH] server/inputs_channel: fix test_display_no_ssl segfault on client disconnect when keyboard never initialized
Marc-André Lureau
mlureau at redhat.com
Tue Aug 11 14:17:55 PDT 2015
ack
----- Original Message -----
> From: Alon Levy <alon at pobox.com>
>
> ---
> 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list