public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: null dereference in error path
Date: Tue, 01 Mar 2005 01:32:54 +0100	[thread overview]
Message-ID: <1109637174.3839.13.camel@boxen> (raw)

The 'bad' label will call function that unconditionally dereferences
the NULL pointer.

Found by the Coverity tool

Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>

===== security/selinux/ss/policydb.c 1.16 vs edited =====
--- 1.16/security/selinux/ss/policydb.c	2005-01-15 23:01:45 +01:00
+++ edited/security/selinux/ss/policydb.c	2005-02-26 12:47:44 +01:00
@@ -773,7 +773,7 @@ static int class_read(struct policydb *p
 	cladatum = kmalloc(sizeof(*cladatum), GFP_KERNEL);
 	if (!cladatum) {
 		rc = -ENOMEM;
-		goto bad;
+		goto out;
 	}
 	memset(cladatum, 0, sizeof(*cladatum));
 



             reply	other threads:[~2005-03-01  0:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-01  0:32 Alexander Nyberg [this message]
2005-03-01  4:11 ` [PATCH] SELinux: null dereference in error path James Morris
2005-03-01  4:25   ` Kyle Moffett
2005-03-01  4:31     ` Andrew Morton
2005-03-01 16:26     ` Folkert van Heusden
2005-03-01 15:05 ` 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=1109637174.3839.13.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