Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- Notes: Version 2: - new patch, separated from the original 06/15 src/qemu/qemu_driver.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b0d67adc1..9d0feb268 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6235,12 +6235,13 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver, virReportSystemError(errno, _("cannot remove corrupt file: %s"), path); - goto error; + } else { + fd = -3; } - return -3; + } else { + virReportError(VIR_ERR_OPERATION_FAILED, + "%s", _("failed to read qemu header")); } - virReportError(VIR_ERR_OPERATION_FAILED, - "%s", _("failed to read qemu header")); goto error; } @@ -6255,9 +6256,10 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver, virReportSystemError(errno, _("cannot remove corrupt file: %s"), path); - goto error; + } else { + fd = -3; } - return -3; + goto error; } } virReportError(VIR_ERR_OPERATION_FAILED, "%s", msg); -- 2.13.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list