From: Alexander Nyberg <alexn@dsv.su.se>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, jmorris@redhat.com, sds@epoch.ncsc.mil
Subject: [PATCH] SELinux: Leak in error path
Date: Tue, 01 Mar 2005 01:32:52 +0100 [thread overview]
Message-ID: <1109637172.3839.11.camel@boxen> (raw)
There's a leak here in the first error path.
Found by the Coverity tool.
Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>
===== 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;
next reply other threads:[~2005-03-01 0:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-01 0:32 Alexander Nyberg [this message]
2005-03-01 4:11 ` James Morris
2005-03-01 15:04 ` Stephen Smalley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1109637172.3839.11.camel@boxen \
--to=alexn@dsv.su.se \
--cc=akpm@osdl.org \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sds@epoch.ncsc.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®