diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 2c33abb615ad512bb0138f603f5d1e0a98dd6b17..ad50b080827802b6d5cfec4bb40f2b15d479d6eb 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -322,19 +322,7 @@ AppArmorSetSecurityHostdevLabelHelper(const char *file, void *opaque) struct SDPDOP *ptr = opaque; virDomainDefPtr def = ptr->def; - if (reload_profile(ptr->mgr, def, file, true) < 0) { - virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef( - def, SECURITY_APPARMOR_NAME); - if (!secdef) { - virReportOOMError(); - return -1; - } - virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot update AppArmor profile \'%s\'"), - secdef->imagelabel); - return -1; - } - return 0; + return reload_profile(ptr->mgr, def, file, true); } static int