Also a typo is fixed (s/detached/attached/)
Signed-off-by: Maxim Nestratov mnestratov@parallels.com
privdom = virDomainObjListFindByUUID(privconn->domains, dom->uuid);
if (privdom == NULL) {
parallelsDomNotFoundError(dom);
- goto cleanup;
+ return -1;
}
if (!(flags & VIR_DOMAIN_AFFECT_CONFIG)) {
break;
default:
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("device type '%s' cannot be detached"),
+ _("device type '%s' cannot be attached"),
virDomainDeviceTypeToString(dev->type));
break;
}
ret = 0;
cleanup:
+ virObjectUnlock(privdom);
return ret;
}