selinux: fix error codes in symtab_init()
Subsystems (2)
PATCH 7/7 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]>
security/selinux/ss/symtab.c +1 -1
@@ -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 ; }
Quoted 4 lines · Dan Carpenter
hashtab_create()only returns NULL on allocation failures to-ENOMEMis appropriate here.Signed-off-by Dan Carpenter <[email protected]>
Acked-by Eric Paris <[email protected]>
Quoted 7 lines
security/selinux/ss/symtab.c +0
-0
security/selinux/ss/symtab.c int symtab_init(struct symtab *s, unsigned int size) · line 42
Quoted 8 lines
security/selinux/ss/symtab.c +1
-1@@ -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; }
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html