aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2012-03-21 09:33:40 -0300
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-03-26 11:28:37 +0100
commit1d6528af68ca4afa3177d18542155976df505872 (patch)
tree4a8345dddd65641ce11a1aab52f16ca727b2f136
parentcb1977d308f6e1d6bf398d42e6148187b82456c1 (diff)
vl.c: fix '-cpu ?' segfault
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>
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 112b0e0af9..0fccf50a5d 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);
}