[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/12] target/i386/cpu: Fix memleak in x86_cpu_class_check_missin
From: |
Pan Nengyuan |
Subject: |
[PATCH 07/12] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features |
Date: |
Fri, 14 Aug 2020 12:02:36 -0400 |
'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>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
---
target/i386/cpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 588f32e136..4678aac0b4 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4872,6 +4872,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);
--
2.18.2
- [PATCH 06/12] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context(), (continued)
- [PATCH 08/12] migration/colo: Plug memleaks in colo_process_incoming_thread, Pan Nengyuan, 2020/08/14
- [PATCH 09/12] blockdev: Fix a memleak in drive_backup_prepare(), Pan Nengyuan, 2020/08/14
- [PATCH 07/12] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features,
Pan Nengyuan <=
- [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file, Pan Nengyuan, 2020/08/14
- [PATCH 02/12] hw/vfio/ap: Plug memleak in vfio_ap_get_group(), Pan Nengyuan, 2020/08/14