You need to sign in or sign up before continuing.
提交 6e51f9cb 编写于 作者: N Namhyung Kim 提交者: Paul Moore

selinux: fix a possible memory leak in cond_read_node()

The cond_read_node() should free the given node on error path as it's
not linked to p->cond_list yet.  This is done via cond_node_destroy()
but it's not called when next_entry() fails before the expr loop.
Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
Signed-off-by: NPaul Moore <pmoore@redhat.com>
上级 f004afe6
......@@ -404,7 +404,7 @@ static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp)
rc = next_entry(buf, fp, sizeof(u32) * 2);
if (rc)
return rc;
goto err;
node->cur_state = le32_to_cpu(buf[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册