[tip:tools/kvm] kvm tools: Free vcpu array on shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  9dfddad5b2b2d501a72071ae0ed85c094b036819
Gitweb:     http://git.kernel.org/tip/9dfddad5b2b2d501a72071ae0ed85c094b036819
Author:     Pekka Enberg <penberg@xxxxxxxxxx>
AuthorDate: Tue, 3 Jan 2012 19:25:28 +0200
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Tue, 3 Jan 2012 19:34:51 +0200

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 <penberg@xxxxxxxxxx>
---
 tools/kvm/builtin-run.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index adfbbbf..249cf82 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux