vl.c: fix '-cpu ?' segfault

Fix stupid copy&paste mistake at commit
ecf40beae7: 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>
This commit is contained in:
Eduardo Habkost 2012-03-21 09:33:40 -03:00 committed by Stefan Hajnoczi
parent cb1977d308
commit 1d6528af68

2
vl.c
View File

@ -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);
}