summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-06-12 22:57:39 +0400
committerJames Morris <jmorris@namei.org>2010-08-02 09:35:04 +0400
commit9a7982793c3aee6ce86d8e7e15306215257329f2 (patch)
tree4d85f6f7a57260cefd938dca7593aabf9c02a59c /security
parent338437f6a09861cdf76e1396ed5fa6dee9c7cabe (diff)
downloadlinux-9a7982793c3aee6ce86d8e7e15306215257329f2.tar.xz
selinux: fix error codes in symtab_init()
hashtab_create() only returns NULL on allocation failures to -ENOMEM is appropriate here. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Eric Paris <eparis@redhat.com> Acked-by: Stephen D. Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/ss/symtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c
index bcf9f620426e..160326ee99e5 100644
--- a/security/selinux/ss/symtab.c
+++ b/security/selinux/ss/symtab.c
@@ -36,7 +36,7 @@ int symtab_init(struct symtab *s, unsigned int size)
{
s->table = hashtab_create(symhash, symcmp, size);
if (!s->table)
- return -1;
+ return -ENOMEM;
s->nprim = 0;
return 0;
}