提交 50c82157 编写于 作者: O Osier Yang

API: Init conn in case of it might be used uninitialized

There is a goto before "conn" is initialized.
上级 55d88def
......@@ -15225,12 +15225,13 @@ virDomainMigrateGetMaxSpeed(virDomainPtr domain,
return -1;
}
conn = domain->conn;
if (!bandwidth) {
virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
goto error;
}
conn = domain->conn;
if (conn->flags & VIR_CONNECT_RO) {
virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册