Since the 90139a62 commit the error is copied into mon->lastError but it's never freed from there. ==31989== 395 bytes in 1 blocks are definitely lost in loss record 877 of 978 ==31989== at 0x4A06C2B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==31989== by 0x7EAF129: strdup (in /lib64/libc-2.15.so) ==31989== by 0x50D586C: virStrdup (virstring.c:554) ==31989== by 0x50976C1: virCopyError (virerror.c:191) ==31989== by 0x5097A35: virCopyLastError (virerror.c:312) ==31989== by 0x114909A9: qemuMonitorIO (qemu_monitor.c:690) ==31989== by 0x509BEDE: virEventPollDispatchHandles (vireventpoll.c:501) ==31989== by 0x509C701: virEventPollRunOnce (vireventpoll.c:648) ==31989== by 0x509A620: virEventRunDefaultImpl (virevent.c:274) ==31989== by 0x520D21C: virNetServerRun (virnetserver.c:1112) ==31989== by 0x11F368: main (libvirtd.c:1513) Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 2bafe28..0e520a0 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -257,6 +257,7 @@ static void qemuMonitorDispose(void *obj) (mon->cb->destroy)(mon, mon->vm, mon->callbackOpaque); virObjectUnref(mon->vm); + virResetError(&mon->lastError); virCondDestroy(&mon->notify); VIR_FREE(mon->buffer); virJSONValueFree(mon->options); -- 1.8.1.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list