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 <[email protected]>
Acked-by: Eric Paris <[email protected]>
Acked-by:  Stephen D. Smalley <[email protected]>
Signed-off-by: James Morris <[email protected]>
This commit is contained in:
Dan Carpenter 2010-06-12 20:57:39 +02:00 • committed by James Morris
commit 9a7982793c

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