mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-18 04:04:34 +00:00
libsepol: verify the right variable after calling calloc()
After "otype = calloc(1, sizeof(*otype))", it is reasonable to check the value of otype, not ft. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
fd9e5ef7b7
commit
ebe24ad20b
@ -2558,7 +2558,7 @@ int filename_trans_read(policydb_t *p, struct policy_file *fp)
|
||||
if (!ft)
|
||||
goto err;
|
||||
otype = calloc(1, sizeof(*otype));
|
||||
if (!ft)
|
||||
if (!otype)
|
||||
goto err;
|
||||
rc = next_entry(buf, fp, sizeof(uint32_t));
|
||||
if (rc < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user