Commit c339cc7b authored by Alexander Nyberg's avatar Alexander Nyberg Committed by Linus Torvalds

[PATCH] SELinux: null dereference in error path

The 'bad' label will call function that unconditionally dereferences the
NULL pointer.

Found by the Coverity tool
Signed-off-by: default avatarAlexander Nyberg <alexn@dsv.su.se>
Acked-by: default avatarJames Morris <jmorris@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 678eef08
......@@ -773,7 +773,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
cladatum = kmalloc(sizeof(*cladatum), GFP_KERNEL);
if (!cladatum) {
rc = -ENOMEM;
goto bad;
goto out;
}
memset(cladatum, 0, sizeof(*cladatum));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment