mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
Alex Jia
68fd6a3b34
virsh: fix invalid free
* tools/virsh.c (cmdDetachDisk): fix invalid free due to using uninitialised value. * How to reproduce? # virsh detach-disk a b error: failed to get domain 'a' *** glibc detected *** virsh: double free or corruption (out): 0x00007fff410ed1a0 *** ======= Backtrace: ========= /lib64/libc.so.6[0x39cf0750c6] /usr/lib/libvirt.so.0(virFree+0x39)[0x7f045938a239] virsh[0x41c768] virsh[0x415075] virsh[0x425d64] /lib64/libc.so.6(__libc_start_main+0xfd)[0x39cf01ecdd] virsh[0x40a419] ======= Memory map: ======== 00400000-0044e000 r-xp 00000000 08:0e 760441 /usr/bin/virsh 0064e000-00650000 rw-p 0004e000 08:0e 760441 /usr/bin/virsh ...... 39d7229000-39d722b000 r--p 00029000 08:0e 2183477 /lib64/libk5crypto.so.3.1 39d722b000-39d722c000 rw-p 0002b000 08:0e 2183477 /lib64/lAborted (core dumped) Signed-off-by: Alex Jia <ajia@redhat.com>
LibVirt : simple API for virtualization Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C API initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed. Daniel Veillard <veillard@redhat.com>
Description
Libvirt provides a portable, long term stable C API for managing the
virtualization technologies provided by many operating systems. It
includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware
vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER
Hypervisor.
Languages
C
94.8%
Python
2%
Meson
0.9%
Shell
0.8%
Dockerfile
0.6%
Other
0.8%