diff options
author | Amy Griffis <amy.griffis@hp.com> | 2006-05-02 15:06:01 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-06-20 05:25:23 -0400 |
commit | 0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b (patch) | |
tree | d8714c7953e2eb5f1e12243fe8098127b4e7cada /kernel | |
parent | 3c66251e573219a0532a5a07381b2f60a412d9eb (diff) | |
download | kernel_samsung_aries-0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b.zip kernel_samsung_aries-0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b.tar.gz kernel_samsung_aries-0a3b483e83edb6aa6d3c49db70eeb6f1cd9f6c6b.tar.bz2 |
[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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index ccfea6d..b3fccd6 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; |