public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SELinux: null dereference in error path
@ 2005-03-01  0:32 Alexander Nyberg
  2005-03-01  4:11 ` James Morris
  2005-03-01 15:05 ` Stephen Smalley
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Nyberg @ 2005-03-01  0:32 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, jmorris, sds

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));
 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-01 16:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-01  0:32 [PATCH] SELinux: null dereference in error path Alexander Nyberg
2005-03-01  4:11 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox