mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 10:25:16 +00:00
Nehal J Wani
6c874c01a0
Fix memory leak in virNWFilterDefParseXML()
While running nwfilterxml2xmltest, it was found that valgrind pointed out the following error... ==7466== 16 bytes in 1 blocks are definitely lost in loss record 26 of 90 ==7466== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==7466== by 0x4C651AD: virAlloc (viralloc.c:142) ==7466== by 0x4D0450D: virNWFilterDefParseNode (nwfilter_conf.c:2575) ==7466== by 0x4D05D84: virNWFilterDefParse (nwfilter_conf.c:2647) ==7466== by 0x401FDE: testCompareXMLToXMLHelper (nwfilterxml2xmltest.c:39) ==7466== by 0x402DE1: virtTestRun (testutils.c:138) ==7466== by 0x4018E9: mymain (nwfilterxml2xmltest.c:111) ==7466== by 0x403482: virtTestMain (testutils.c:593) ==7466== by 0x341F421A04: (below main) (libc-start.c:225) ...21 times, which are related to 21 tests in nwfilterxml2xmltest.c which sent EXPECT_WARN = false. There were two scenarios in virNWFilterDefParseXML(), when the variable 'entry' was malloc'ed, but not freed.
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%