]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Free vcpu array on shutdown
authorPekka Enberg <penberg@kernel.org>
Tue, 3 Jan 2012 17:25:28 +0000 (19:25 +0200)
committerPekka Enberg <penberg@kernel.org>
Tue, 3 Jan 2012 17:34:51 +0000 (19:34 +0200)
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@kernel.org>
tools/kvm/builtin-run.c

index adfbbbf6ea4e74bec823d3f3e53ea3e84b1a245f..249cf8200c40bb90a72457ba1e74dc4dab607af9 100644 (file)
@@ -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)