qemuDomainObjPrivatePtr priv = vm->privateData;
int ret = -1;
- if ((driver->securityDriver &&
- driver->securityDriver->domainSetSecuritySocketLabel &&
- driver->securityDriver->domainSetSecuritySocketLabel(driver->securityDriver,vm)) < 0) {
- VIR_ERROR(_("Failed to set security context for monitor for %s"), vm->def->name);
+ if (driver->securityDriver &&
+ driver->securityDriver->domainSetSecuritySocketLabel &&
+ driver->securityDriver->domainSetSecuritySocketLabel
+ (driver->securityDriver,vm) < 0) {
+ VIR_ERROR(_("Failed to set security context for monitor for %s"),
+ vm->def->name);
goto error;
}
if (priv->mon == NULL)
virDomainObjUnref(vm);
- if ((driver->securityDriver &&
- driver->securityDriver->domainClearSecuritySocketLabel &&
- driver->securityDriver->domainClearSecuritySocketLabel(driver->securityDriver,vm)) < 0) {
- VIR_ERROR(_("Failed to set security context for monitor for %s"), vm->def->name);
+ if (driver->securityDriver &&
+ driver->securityDriver->domainClearSecuritySocketLabel &&
+ driver->securityDriver->domainClearSecuritySocketLabel
+ (driver->securityDriver,vm) < 0) {
+ VIR_ERROR(_("Failed to clear security context for monitor for %s"),
+ vm->def->name);
goto error;
}