[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/10] target/i386/cpu: Fix memleak in x86_cpu_class_check_mis
From: |
Pan Nengyuan |
Subject: |
[PATCH v2 06/10] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features |
Date: |
Mon, 31 Aug 2020 09:43:11 -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>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
---
- V2: no changes in v2.
---
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 v2 00/10] fix some error memleaks, Pan Nengyuan, 2020/08/31
- [PATCH v2 01/10] qga/channel-posix: Plug memory leak in ga_channel_write_all(), Pan Nengyuan, 2020/08/31
- [PATCH v2 04/10] target/i386/sev: Plug memleak in sev_read_file_base64, Pan Nengyuan, 2020/08/31
- [PATCH v2 07/10] migration/colo: Plug memleaks in colo_process_incoming_thread, Pan Nengyuan, 2020/08/31
- [PATCH v2 03/10] elf2dmp/pdb: Plug memleak in pdb_init_from_file, Pan Nengyuan, 2020/08/31
- [PATCH v2 06/10] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features,
Pan Nengyuan <=
- [PATCH v2 09/10] block/file-posix: fix a possible undefined behavior, Pan Nengyuan, 2020/08/31
- [PATCH v2 08/10] blockdev: Fix a memleak in drive_backup_prepare(), Pan Nengyuan, 2020/08/31
- [PATCH v2 10/10] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string, Pan Nengyuan, 2020/08/31
- [PATCH v2 02/10] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init, Pan Nengyuan, 2020/08/31
- [PATCH v2 05/10] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context(), Pan Nengyuan, 2020/08/31