kernel: correctly handle add attr

This commit is contained in:
weishu
2023-02-14 18:52:48 +07:00
parent 0c8b4a48de
commit d5bab2317e

View File

@@ -588,6 +588,7 @@ static bool add_type(struct policydb *db, const char *type_name, bool attr)
type->primary = 1;
type->value = value;
type->attribute = attr;
char *key = kstrdup(type_name, GFP_ATOMIC);
if (!key) {