diff --git a/src/libvirt.c b/src/libvirt.c index 4284954e00cd6d8c50ad23073c739b2064b2213e..eca919ad0ea8c6fca9aa67b864f096d56b644ce1 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -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;