dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Dan Carpenter 2010-06-12 20:57:39 +02:00 committed by James Morris
parent 338437f6a0
commit 9a7982793c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}