From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB3AY-0006R5-Bx for qemu-devel@nongnu.org; Tue, 04 Oct 2011 07:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RB3AX-0002V8-7d for qemu-devel@nongnu.org; Tue, 04 Oct 2011 07:28:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB3AX-0002Um-0Z for qemu-devel@nongnu.org; Tue, 04 Oct 2011 07:28:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p94BSFLQ029230 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 4 Oct 2011 07:28:15 -0400 From: Alon Levy Date: Tue, 4 Oct 2011 13:25:53 +0200 Message-Id: <1317727553-19852-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH] ui/spice-core: fix segfault in monitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kraxel@redhat.com Fix segfault if a qxl device is present but no spice command line argument is given. RHBZ 743251. Signed-off-by: Alon Levy --- ui/spice-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 3cbc721..b14d1d9 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -413,7 +413,7 @@ void do_info_spice(Monitor *mon, QObject **ret_data) int port, tls_port; char version_string[20]; /* 12 = |255.255.255\0| is the max */ - if (!spice_server) { + if (!spice_server || !opts) { *ret_data = qobject_from_jsonf("{ 'enabled': false }"); return; } -- 1.7.6.4