From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyNXF-0003NE-MO for qemu-devel@nongnu.org; Mon, 16 Nov 2015 12:25:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyNXD-0000RN-23 for qemu-devel@nongnu.org; Mon, 16 Nov 2015 12:25:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyNXC-0000R6-Mn for qemu-devel@nongnu.org; Mon, 16 Nov 2015 12:25:42 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 615AAC4099 for ; Mon, 16 Nov 2015 17:25:42 +0000 (UTC) From: Gerd Hoffmann Date: Mon, 16 Nov 2015 18:25:30 +0100 Message-Id: <1447694735-3420-16-git-send-email-kraxel@redhat.com> In-Reply-To: <1447694735-3420-1-git-send-email-kraxel@redhat.com> References: <1447694735-3420-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 15/20] vnc: fix local state init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Reviewed-by: Peter Lieven Reviewed-by: Daniel P. Berrange Message-id: 1446203414-4013-16-git-send-email-kraxel@redhat.com --- ui/vnc-jobs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index fd9ed39..12389cc 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -185,6 +185,9 @@ void vnc_jobs_consume_buffer(VncState *vs) */ static void vnc_async_encoding_start(VncState *orig, VncState *local) { + buffer_init(&local->output, "vnc-worker-output"); + local->csock = -1; /* Don't do any network work on this thread */ + local->vnc_encoding = orig->vnc_encoding; local->features = orig->features; local->vd = orig->vd; @@ -196,7 +199,6 @@ static void vnc_async_encoding_start(VncState *orig, VncState *local) local->zlib = orig->zlib; local->hextile = orig->hextile; local->zrle = orig->zrle; - local->csock = -1; /* Don't do any network work on this thread */ } static void vnc_async_encoding_end(VncState *orig, VncState *local) @@ -212,12 +214,10 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) { VncJob *job; VncRectEntry *entry, *tmp; - VncState vs; + VncState vs = {}; int n_rectangles; int saved_offset; - buffer_init(&vs.output, "vnc-worker-output"); - vnc_lock_queue(queue); while (QTAILQ_EMPTY(&queue->jobs) && !queue->exit) { qemu_cond_wait(&queue->cond, &queue->mutex); -- 1.8.3.1