Received: from eggs.gnu.org ([140.186.70.92]:38984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgZZ-0002hI-R8 for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:57:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIgNe-0004Ld-2a for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:45:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgNd-0004LF-Qz for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:45:22 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9PCjKns031478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Oct 2011 08:45:21 -0400 From: Gerd Hoffmann Date: Tue, 25 Oct 2011 14:25:46 +0200 Message-Id: <1319545550-24203-8-git-send-email-kraxel@redhat.com> In-Reply-To: <1319545550-24203-1-git-send-email-kraxel@redhat.com> References: <1319545550-24203-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 07/11] 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: Alon Levy From: Alon Levy 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 4c06c36..be52356 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -445,7 +445,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.1