diff --git a/shim.c b/shim.c index b9d33d6b1..8d5ff589a 100644 --- a/shim.c +++ b/shim.c @@ -1744,11 +1744,12 @@ shim_fini(void) uninstall_shim_protocols(); if (secure_mode()) { - - /* - * Remove our hooks from system services. - */ - unhook_system_services(); + if (vendor_authorized_size || vendor_deauthorized_size) { + /* + * Remove our hooks from system services. + */ + unhook_system_services(); + } } unhook_exit();