aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-02-25 22:54:53 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-02-25 16:04:43 -0600
commitc53af37f375ce9c4999ff451c51173bdc1167e67 (patch)
tree55dbd29263542085dccb960893daa378e9b66395 /ui
parent30faaf7073dd51b9e06589d7886696a3f13f201c (diff)
downloadqemu-c53af37f375ce9c4999ff451c51173bdc1167e67.zip
qemu-c53af37f375ce9c4999ff451c51173bdc1167e67.tar.gz
qemu-c53af37f375ce9c4999ff451c51173bdc1167e67.tar.bz2
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>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc-jobs-async.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/vnc-jobs-async.c b/ui/vnc-jobs-async.c
index 1d4c5e7..f596247 100644
--- a/ui/vnc-jobs-async.c
+++ b/ui/vnc-jobs-async.c
@@ -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)