提交 9a798279 编写于 作者: D Dan Carpenter 提交者: James Morris

selinux: fix error codes in symtab_init()

hashtab_create() only returns NULL on allocation failures to -ENOMEM is
appropriate here.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NEric Paris <eparis@redhat.com>
Acked-by: NStephen D. Smalley <sds@tycho.nsa.gov>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 338437f6
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册