diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2024-07-14 19:46:52 +0900 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-16 12:47:44 +0200 |
commit | f8b64d35a625e49ee73f7d54ae80cb5503be975b (patch) | |
tree | ad2138351f1447c88a9f071f6b51be11bf1474da /hw | |
parent | e0bf95443ee9326d44031373420cf9f3513ee255 (diff) | |
download | qemu-f8b64d35a625e49ee73f7d54ae80cb5503be975b.zip qemu-f8b64d35a625e49ee73f7d54ae80cb5503be975b.tar.gz qemu-f8b64d35a625e49ee73f7d54ae80cb5503be975b.tar.bz2 |
cpu: Free queued CPU work
Running qemu-system-aarch64 -M virt -nographic and terminating it will
result in a LeakSanitizer error due to remaining queued CPU work so
free it.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Link: https://lore.kernel.org/r/20240714-cpu-v1-1-19c2f8de2055@daynix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/cpu-common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index b19e1fd..d2e3e45 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -281,6 +281,7 @@ static void cpu_common_finalize(Object *obj) g_free(cpu->plugin_state); } #endif + free_queued_cpu_work(cpu); g_array_free(cpu->gdb_regs, TRUE); qemu_lockcnt_destroy(&cpu->in_ioctl_lock); qemu_mutex_destroy(&cpu->work_mutex); |