os-util: return earlier when unsupported image class is specified

This commit is contained in:
Yu Watanabe
2023-04-11 18:47:15 +09:00
parent 7213c75045
commit 7421f20c7e
+3
View File
@@ -156,6 +156,9 @@ int open_extension_release(
if (!extension)
return open_os_release(root, ret_path, ret_fd);
if (!IN_SET(image_class, IMAGE_SYSEXT, IMAGE_CONFEXT))
return -EINVAL;
const char *extension_full_path;
if (!image_name_is_valid(extension))