vnc: fix a memory leak in threaded vnc server
VncJobQueue's buffer is intended to be used for as the output buffer for all operations in this queue, but unfortunatly. vnc_async_encoding_start() is in charge of setting this buffer as the current output buffer, but vnc_async_encoding_end() was not writting the changes back to VncJobQueue, resulting in a big and ugly memleak. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
30faaf7073
commit
c53af37f37
@ -186,6 +186,8 @@ static void vnc_async_encoding_end(VncState *orig, VncState *local)
|
||||
orig->hextile = local->hextile;
|
||||
orig->zrle = local->zrle;
|
||||
orig->lossy_rect = local->lossy_rect;
|
||||
|
||||
queue->buffer = local->output;
|
||||
}
|
||||
|
||||
static int vnc_worker_thread_loop(VncJobQueue *queue)
|
||||
|
Loading…
x
Reference in New Issue
Block a user