If virSecurityManagerClearSocketLabel() fails, 'agent' won't be freed before jumping to cleanup. Signed-off-by: Wang Rui <moon.wangrui@xxxxxxxxxx> --- src/qemu/qemu_process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f68dfbe..79f4238 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -264,6 +264,7 @@ qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm) vm->def) < 0) { VIR_ERROR(_("Failed to clear security context for agent for %s"), vm->def->name); + qemuAgentClose(agent); goto cleanup; } -- 1.7.12.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list