mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
API: Init conn in case of it might be used uninitialized
There is a goto before "conn" is initialized.
This commit is contained in:
parent
55d88def95
commit
50c82157e1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user