From 9a7982793c3aee6ce86d8e7e15306215257329f2 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 12 Jun 2010 20:57:39 +0200 Subject: [PATCH] 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 Acked-by: Eric Paris Acked-by: Stephen D. Smalley Signed-off-by: James Morris --- security/selinux/ss/symtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c index bcf9f62..160326e 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; } -- 2.7.4