]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: fix a possible memory leak in cond_read_node()
authorNamhyung Kim <namhyung@kernel.org>
Sat, 14 Jun 2014 16:19:02 +0000 (01:19 +0900)
committerPaul Moore <pmoore@redhat.com>
Thu, 19 Jun 2014 18:56:59 +0000 (14:56 -0400)
commit1831dd694e6e13441fe0b4758b5ad4f9da878ef9
tree1fb97b53d5b40ceb9df33f43743ca232332d794f
parentc2d0052bf670ac63729b9fa2c1916542eb15a846
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: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/ss/conditional.c