aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPan Nengyuan <pannengyuan@huawei.com>2020-08-31 09:43:11 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-02 07:29:29 -0400
commit3aa8203e5ef460f9e22ca1dd78f2013fa9610276 (patch)
tree3e7dedfaf36ecb75f010a4ad5f62a88c49c4bc79 /target
parent74ded8b487a074aff89a642630c0402053f80d1b (diff)
target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features
'err' forgot to free in x86_cpu_class_check_missing_features error path. Fix that. Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200831134315.1221-7-pannengyuan@huawei.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index ba4667b33c..49d8958528 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4947,6 +4947,7 @@ static void x86_cpu_class_check_missing_features(X86CPUClass *xcc,
new->value = g_strdup("type");
*next = new;
next = &new->next;
+ error_free(err);
}
x86_cpu_filter_features(xc, false);