]> git.proxmox.com Git - qemu.git/commitdiff
vl.c: fix '-cpu ?' segfault
authorEduardo Habkost <ehabkost@redhat.com>
Wed, 21 Mar 2012 12:33:40 +0000 (09:33 -0300)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 26 Mar 2012 10:28:37 +0000 (11:28 +0100)
Fix stupid copy&paste mistake at commit
ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept
"optarg" on the cpu_list() call.

Reported-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
vl.c

diff --git a/vl.c b/vl.c
index 112b0e0af96628c883b5cad61feb8fbafc41b808..0fccf50a5d191d6054f9e62a07c78b246eba5305 100644 (file)
--- 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);
     }