aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index b95c161c1d..65e6b75a74 100644
--- a/vl.c
+++ b/vl.c
@@ -3834,8 +3834,7 @@ int main(int argc, char **argv, char **envp)
cleanup_add_fd, NULL, &error_fatal);
#endif
- current_machine = MACHINE(object_new(object_class_get_name(
- OBJECT_CLASS(machine_class))));
+ current_machine = MACHINE(object_new_with_class(OBJECT_CLASS(machine_class)));
if (machine_help_func(qemu_get_machine_opts(), current_machine)) {
exit(0);
}