Commit 46619b4
selinux: fix return value on error in policydb_read()
The value of rc is still zero from the last assignment when the error
path is taken. Fix it by setting it to -ENOMEM before the
hashtab_create() call.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: e67b2ec ("selinux: store role transitions in a hash table")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>1 parent 3348bd3 commit 46619b4
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2540 | 2540 | | |
2541 | 2541 | | |
2542 | 2542 | | |
| 2543 | + | |
2543 | 2544 | | |
2544 | 2545 | | |
2545 | 2546 | | |
| |||
0 commit comments