[Spice-devel] [PATCH x11spice] Fix hang when launching with invalid config

Brendan Shanks bshanks at codeweavers.com
Thu Jul 11 17:43:17 UTC 2019


When launching with no config file or arguments, the "You must provide
some authentication method" dialog appears. Clicking the Close button
would hang the application and it would never quit.

s->draw_command_in_progress was uninitialized, and flush_and_lock()
would get stuck in an infinite loop waiting for it to be 0.

Initialize s->draw_command_in_progress to 0.

Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
---
 src/session.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/session.c b/src/session.c
index 1e59415..c5a439c 100644
--- a/src/session.c
+++ b/src/session.c
@@ -306,6 +306,7 @@ int session_create(session_t *s)
     s->connected = FALSE;
     s->connect_pid = 0;
     s->disconnect_pid = 0;
+    s->draw_command_in_progress = 0;
 
     if (s->options.audit)
         rc = begin_audit(s);
-- 
2.17.1



More information about the Spice-devel mailing list