[spice-server 1/2] smartcard: Fix SmartcardChannelClient creation

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

 



The wrong type (RED_TYPE_CHANNEL_CLIENT rather than
TYPE_SMARTCARD_CHANNEL_CLIENT) was used when creating a
SmartcardChannelClient, which meant the _init function was never called,
and SmartcardChannelClient::priv was never initialized.

This caused a crash when trying to connect with --spice-smartcard to a
VM with a smartcard channel configured.
---
 server/smartcard-channel-client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/smartcard-channel-client.c b/server/smartcard-channel-client.c
index d00a6b2..14fea4f 100644
--- a/server/smartcard-channel-client.c
+++ b/server/smartcard-channel-client.c
@@ -119,7 +119,7 @@ SmartCardChannelClient* smartcard_channel_client_create(RedChannel *channel,
         g_array_append_vals(caps_array, caps, num_caps);
     }
 
-    rcc = g_initable_new(RED_TYPE_CHANNEL_CLIENT,
+    rcc = g_initable_new(TYPE_SMARTCARD_CHANNEL_CLIENT,
                          NULL, NULL,
                          "channel", channel,
                          "client", client,
-- 
2.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]