Files
qemu/ui
Marc-André Lureau 3cae0b46be ui/vnc-jobs: fix VncRectEntry leak on job cleanup
When a VncJob is freed, its associated VncRectEntry list must also be
freed. Previously, vnc_job_push() and the disconnected path in
vnc_worker_thread_loop() called g_free(job) directly, leaking all
VncRectEntry allocations.

Introduce vnc_job_free() which iterates and frees the rectangle entries
before freeing the job itself, and use it in both paths.

Also add QLIST_REMOVE() in the worker loop before g_free(entry), so
that entries processed during normal operation are properly unlinked.
Without this, vnc_job_free() would iterate dangling pointers to
already-freed entries, causing use-after-free.

Fixes: bd023f953e ("vnc: threaded VNC server")
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2026-03-30 14:05:10 +04:00
..
2021-12-21 10:50:22 +04:00
2021-12-21 10:50:22 +04:00
2024-12-20 17:44:56 +01:00
2023-08-31 19:47:43 +02:00
2024-09-13 20:12:16 +02:00
2026-03-06 17:27:40 +00:00
2022-11-08 10:23:06 +01:00
2022-11-08 10:23:06 +01:00
2023-08-31 19:47:43 +02:00
2023-06-05 20:48:34 +02:00
2025-10-30 22:56:51 +04:00