提交 ac793bd7 编写于 作者: J Jiri Denemark

qemu: Fix memory leaks in qemuDomainSaveImageOpen

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 ec3e4bb7
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册