There's a leak here in the first error path.
Found by the Coverity tool.
Signed-off-by: Alexander Nyberg <[email protected]>
===== security/selinux/ss/conditional.c 1.3 vs edited =====
--- 1.3/security/selinux/ss/conditional.c 2005-01-05 03:48:22 +01:00
+++ edited/security/selinux/ss/conditional.c 2005-02-23 21:22:25 +01:00
@@ -401,8 +401,10 @@ static int cond_read_node(struct policyd
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;
On Tue, 1 Mar 2005, Alexander Nyberg wrote:
> There's a leak here in the first error path.
>
> Found by the Coverity tool.
>
> Signed-off-by: Alexander Nyberg <[email protected]>
Signed-off-by: James Morris <[email protected]>
--
James Morris
<[email protected]>
On Tue, 2005-03-01 at 01:32 +0100, Alexander Nyberg wrote:
> There's a leak here in the first error path.
>
> Found by the Coverity tool.
>
> Signed-off-by: Alexander Nyberg <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
--
Stephen Smalley <[email protected]>
National Security Agency