Skip to content
Snippets Groups Projects
Commit b57489cf authored by Jorge Acereda Maciá's avatar Jorge Acereda Maciá Committed by Gerd Hoffmann
Browse files

Fix crash when connecting to VNC through websocket


Connecting to VNC through websocket crashes in vnc_flush() when trying
to acquire a mutex that hasn't been initialized (vnc_init_state(vs)
hasn't been called at this point).

Signed-off-by: default avatarJorge Acereda Macia <jacereda@gmail.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 006decd4
No related branches found
No related tags found
No related merge requests found
......@@ -207,8 +207,7 @@ static void vncws_send_handshake_response(VncState *vs, const char* key)
}
response = g_strdup_printf(WS_HANDSHAKE, accept);
vnc_write(vs, response, strlen(response));
vnc_flush(vs);
vnc_client_write_buf(vs, (const uint8_t *)response, strlen(response));
g_free(accept);
g_free(response);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment