1
0
Fork 0

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>
zero-colors
Markus Elfring 2017-01-14 21:20:43 +01:00 committed by Paul Moore
parent 9c312e79d6
commit 7f6d0ad8b7
1 changed files with 1 additions and 2 deletions

View File

@ -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)