Commit 678eef08 authored by Alexander Nyberg's avatar Alexander Nyberg Committed by Linus Torvalds

[PATCH] SELinux: Leak in error path

There's a leak here in the first error path.

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 7e629b50
......@@ -401,8 +401,10 @@ static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp)
expr->expr_type = le32_to_cpu(buf[0]);
expr->bool = le32_to_cpu(buf[1]);
if (!expr_isvalid(p, expr))
if (!expr_isvalid(p, expr)) {
kfree(expr);
goto err;
}
if (i == 0) {
node->expr = expr;
......
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