mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
selinux: Return directly after a failed kzalloc() in cat_read()
Return directly after a call of the function "kzalloc" failed at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
9c312e79d6
commit
7f6d0ad8b7
@ -1637,10 +1637,9 @@ static int cat_read(struct policydb *p, struct hashtab *h, void *fp)
|
||||
__le32 buf[3];
|
||||
u32 len;
|
||||
|
||||
rc = -ENOMEM;
|
||||
catdatum = kzalloc(sizeof(*catdatum), GFP_ATOMIC);
|
||||
if (!catdatum)
|
||||
goto bad;
|
||||
return -ENOMEM;
|
||||
|
||||
rc = next_entry(buf, fp, sizeof buf);
|
||||
if (rc)
|
||||
|
Loading…
Reference in New Issue
Block a user