SELinux: fix error code in policydb_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Feb 2015 16:34:30 +0000 (11:34 -0500)
committerPaul Moore <pmoore@redhat.com>
Wed, 4 Feb 2015 16:34:30 +0000 (11:34 -0500)
commit6eb4e2b41b264f57ee02d16ee61683952945484d
tree9ab88aee868ae4213a72b880d6e2a381c665e125
parentd5f3a5f6e7e7822df5680d4fe39bf0b6979a1535
SELinux: fix error code in policydb_init()

If hashtab_create() returns a NULL pointer then we should return -ENOMEM
but instead the current code returns success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/ss/policydb.c