summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAmy Griffis <amy.griffis@hp.com>2006-05-02 15:06:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-06-20 05:25:23 -0400
commit0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b (patch)
treed8714c7953e2eb5f1e12243fe8098127b4e7cada /kernel
parent3c66251e573219a0532a5a07381b2f60a412d9eb (diff)
downloadblackbird-op-linux-0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b.tar.gz
blackbird-op-linux-0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b.zip
[PATCH] fix audit_krule_to_{rule,data} return values
Don't return -ENOMEM when callers of these functions are checking for a NULL return. Bug noticed by Serge Hallyn. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditfilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index ccfea6d82cc3..b3fccd6808f9 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -291,7 +291,7 @@ static struct audit_rule *audit_krule_to_rule(struct audit_krule *krule)
rule = kmalloc(sizeof(*rule), GFP_KERNEL);
if (unlikely(!rule))
- return ERR_PTR(-ENOMEM);
+ return NULL;
memset(rule, 0, sizeof(*rule));
rule->flags = krule->flags | krule->listnr;
@@ -322,7 +322,7 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule)
data = kmalloc(sizeof(*data) + krule->buflen, GFP_KERNEL);
if (unlikely(!data))
- return ERR_PTR(-ENOMEM);
+ return NULL;
memset(data, 0, sizeof(*data));
data->flags = krule->flags | krule->listnr;
OpenPOWER on IntegriCloud