mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 15:45:54 +00:00
worker: do not leak cursor after disconnecting clients
Calling cursor_channel_disconnect does not free cursor_display so this causes a leak. Is the only code where this pointer is reset preventing any further cursor channel connection. If a client is lazy reading cursor data during the flush connection is closed and further clients won't be able to use the cursor. This also prevents future use of a NULL pointer. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
This commit is contained in:
parent
8191265f78
commit
871dbe5417
@ -454,7 +454,6 @@ static void flush_cursor_commands(RedWorker *worker)
|
||||
if (spice_get_monotonic_time_ns() >= end_time) {
|
||||
spice_warning("flush cursor timeout");
|
||||
cursor_channel_disconnect(worker->cursor_channel);
|
||||
worker->cursor_channel = NULL;
|
||||
} else {
|
||||
sleep_count++;
|
||||
usleep(DISPLAY_CLIENT_RETRY_INTERVAL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user