Skip to content

Commit

Permalink
selinux: fix error codes in symtab_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and James Morris committed Aug 2, 2010
1 parent 338437f commit 9a79827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/ss/symtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9a79827

Please sign in to comment.