The error paths after fix suppose ret == -1 as at the beginning of the function. The better fix would be not to touch 'ret' at all until the end of the function where it is set to 0. Thus we'd better introduce some 'rc' variable to hold return values of called functions. --- src/qemu/qemu_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 351e529..dfbf846 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6790,6 +6790,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn, virDomainAuditStart(vm, "restored", false); goto cleanup; } + ret = -1; event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STARTED, -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list