summaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-05-04 11:59:34 +1000
committerJames Morris <jmorris@namei.org>2011-05-04 11:59:34 +1000
commit6f239284542bae297d27355d06afbb8df23c5db9 (patch)
treeb0ba42fb54cd05178c61584e0913be38a57f0384 /security/selinux/ss
parent609cfda586c7fe3e5d1a02c51edb587506294167 (diff)
parentbf69d41d198138e3c601e9a6645f4f1369aff7e0 (diff)
Merge branch 'for-linus' of git://git.infradead.org/users/eparis/selinux into for-linus
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/policydb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index e7b850ad57e..e6e7ce0d3d5 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -502,7 +502,7 @@ static int policydb_index(struct policydb *p)
goto out;
rc = flex_array_prealloc(p->type_val_to_struct_array, 0,
- p->p_types.nprim - 1, GFP_KERNEL | __GFP_ZERO);
+ p->p_types.nprim, GFP_KERNEL | __GFP_ZERO);
if (rc)
goto out;
@@ -519,7 +519,7 @@ static int policydb_index(struct policydb *p)
goto out;
rc = flex_array_prealloc(p->sym_val_to_name[i],
- 0, p->symtab[i].nprim - 1,
+ 0, p->symtab[i].nprim,
GFP_KERNEL | __GFP_ZERO);
if (rc)
goto out;
@@ -2375,7 +2375,7 @@ int policydb_read(struct policydb *p, void *fp)
goto bad;
/* preallocate so we don't have to worry about the put ever failing */
- rc = flex_array_prealloc(p->type_attr_map_array, 0, p->p_types.nprim - 1,
+ rc = flex_array_prealloc(p->type_attr_map_array, 0, p->p_types.nprim,
GFP_KERNEL | __GFP_ZERO);
if (rc)
goto bad;