diff options
-rw-r--r-- | security/selinux/ss/services.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 44eb4d74908d..8a764928ff4b 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -1712,11 +1712,11 @@ int security_get_bools(int *len, char ***names, int **values) | |||
1712 | goto out; | 1712 | goto out; |
1713 | } | 1713 | } |
1714 | 1714 | ||
1715 | *names = (char**)kcalloc(*len, sizeof(char*), GFP_ATOMIC); | 1715 | *names = kcalloc(*len, sizeof(char*), GFP_ATOMIC); |
1716 | if (!*names) | 1716 | if (!*names) |
1717 | goto err; | 1717 | goto err; |
1718 | 1718 | ||
1719 | *values = (int*)kcalloc(*len, sizeof(int), GFP_ATOMIC); | 1719 | *values = kcalloc(*len, sizeof(int), GFP_ATOMIC); |
1720 | if (!*values) | 1720 | if (!*values) |
1721 | goto err; | 1721 | goto err; |
1722 | 1722 | ||
@@ -1724,7 +1724,7 @@ int security_get_bools(int *len, char ***names, int **values) | |||
1724 | size_t name_len; | 1724 | size_t name_len; |
1725 | (*values)[i] = policydb.bool_val_to_struct[i]->state; | 1725 | (*values)[i] = policydb.bool_val_to_struct[i]->state; |
1726 | name_len = strlen(policydb.p_bool_val_to_name[i]) + 1; | 1726 | name_len = strlen(policydb.p_bool_val_to_name[i]) + 1; |
1727 | (*names)[i] = (char*)kmalloc(sizeof(char) * name_len, GFP_ATOMIC); | 1727 | (*names)[i] = kmalloc(sizeof(char) * name_len, GFP_ATOMIC); |
1728 | if (!(*names)[i]) | 1728 | if (!(*names)[i]) |
1729 | goto err; | 1729 | goto err; |
1730 | strncpy((*names)[i], policydb.p_bool_val_to_name[i], name_len); | 1730 | strncpy((*names)[i], policydb.p_bool_val_to_name[i], name_len); |