From 9dfddad5b2b2d501a72071ae0ed85c094b036819 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Tue, 3 Jan 2012 19:25:28 +0200 Subject: [PATCH] kvm tools: Free vcpu array on shutdown This patch silences the following harmless warning to reduce valgrind noise: ==5529== 864 bytes in 3 blocks are possibly lost in loss record 39 of 48 ==5529== at 0x4A04B84: calloc (vg_replace_malloc.c:467) ==5529== by 0x3DE6410D44: _dl_allocate_tls (in /lib64/ld-2.14.so) ==5529== by 0x3DE70082F5: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.14.so) ==5529== by 0x405755: kvm_cmd_run (builtin-run.c:1169) ==5529== by 0x40D47D: handle_command (kvm-cmd.c:84) ==5529== by 0x3DE682139C: (below main) (in /lib64/libc-2.14.so) Signed-off-by: Pekka Enberg --- tools/kvm/builtin-run.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index adfbbbf6ea4e..249cf8200c40 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -1196,6 +1196,7 @@ err: virtio_rng__delete_all(kvm); disk_image__close_all(kvm->disks, image_count); + free(kvm_cpus); kvm__delete(kvm); if (!exit_code) -- 2.39.5