On Thu, Mar 13, 2025 at 14:44:36 +0100, Michal Privoznik wrote: > When the CH driver starts a domain virCHProcessSetupIOThreads() > is called eventually which in turn calls > virCHMonitorGetIOThreads(). The latter returns an array of > iothreads which is never freed leading to a memleak: > > 130 (104 direct, 26 indirect) bytes in 1 blocks are definitely lost in loss record 1,804 of 1,998 > at 0x484CEF3: calloc (vg_replace_malloc.c:1675) > by 0x4F0E7A9: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8000.5) > by 0xB3A9359: virCHMonitorGetIOThreads (ch_monitor.c:1183) > by 0xB3AA5BB: virCHProcessSetupIOThreads (ch_process.c:348) > by 0xB3AAC59: virCHProcessSetup (ch_process.c:480) > by 0xB3AC75A: virCHProcessStart (ch_process.c:973) > by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246) > by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188) > by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186) > by 0x168F18: remoteDispatchDomainCreateXMLHelper (remote_daemon_dispatch_stubs.h:5167) > by 0x4B20066: virNetServerProgramDispatchCall (virnetserverprogram.c:423) > by 0x4B1FB99: virNetServerProgramDispatch (virnetserverprogram.c:299) > > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > src/ch/ch_process.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>