[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    [PATCH] SELinux: null dereference in error path
From:       Alexander Nyberg <alexn () dsv ! su ! se>
Date:       2005-03-01 0:32:54
Message-ID: 1109637174.3839.13.camel () boxen
[Download RAW message or body]

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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic