aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/cpuid.c')
-rw-r--r--target-i386/cpuid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 352c390d0c..99cff65aae 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -950,6 +950,7 @@ static int cpudef_setfield(const char *name, const char *str, void *opaque)
int err = 0;
if (!strcmp(name, "name")) {
+ g_free((void *)def->name);
def->name = g_strdup(str);
} else if (!strcmp(name, "model_id")) {
strncpy(def->model_id, str, sizeof (def->model_id));