aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index f0fe48b..e2e2ac7 100644
--- a/vl.c
+++ b/vl.c
@@ -58,6 +58,7 @@ int main(int argc, char **argv)
#include <glib.h>
+#include "qemu/sockets.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "hw/usb.h"
@@ -103,7 +104,6 @@ int main(int argc, char **argv)
#include "disas/disas.h"
-#include "qemu/sockets.h"
#include "slirp/libslirp.h"
@@ -1587,14 +1587,16 @@ static void machine_class_init(ObjectClass *oc, void *data)
int qemu_register_machine(QEMUMachine *m)
{
+ char *name = g_strconcat(m->name, TYPE_MACHINE_SUFFIX, NULL);
TypeInfo ti = {
- .name = g_strconcat(m->name, TYPE_MACHINE_SUFFIX, NULL),
+ .name = name,
.parent = TYPE_MACHINE,
.class_init = machine_class_init,
.class_data = (void *)m,
};
type_register(&ti);
+ g_free(name);
return 0;
}