From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAKje-0008S5-O5 for qemu-devel@nongnu.org; Wed, 21 Mar 2012 08:33:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAKjY-00089w-L0 for qemu-devel@nongnu.org; Wed, 21 Mar 2012 08:33:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAKjY-00089j-D1 for qemu-devel@nongnu.org; Wed, 21 Mar 2012 08:33:44 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2LCXgLq024405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 21 Mar 2012 08:33:42 -0400 From: Eduardo Habkost Date: Wed, 21 Mar 2012 09:33:40 -0300 Message-Id: <1332333220-31420-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH] fix '-cpu ?' Segfault List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jiri Denemark Fix stupid copy&paste mistake at commit ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept "optarg" on the cpu_list() call. Reported-by: Jiri Denemark Signed-off-by: Eduardo Habkost --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 112b0e0..0fccf50 100644 --- a/vl.c +++ b/vl.c @@ -3196,7 +3196,7 @@ int main(int argc, char **argv, char **envp) cpudef_init(); if (cpu_model && *cpu_model == '?') { - list_cpus(stdout, &fprintf, optarg); + list_cpus(stdout, &fprintf, cpu_model); exit(0); } -- 1.7.3.2