Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e1fbd12c958591695f89b11f9c6ec08d002e358
Commit:     3e1fbd12c958591695f89b11f9c6ec08d002e358
Parent:     5c95da9f5abeff865b7273b59e1a3c50a2c5acb2
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 22 01:10:02 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Dec 22 08:55:49 2006 -0800

    [PATCH] audit: fix kstrdup() error check
    
    kstrdup() returns NULL on error.
    
    Cc: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
    Cc: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/auditfilter.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 2e896f8..9c8c232 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -800,8 +800,8 @@ static inline int audit_dupe_selinux_field(struct 
audit_field *df,
 
        /* our own copy of se_str */
        se_str = kstrdup(sf->se_str, GFP_KERNEL);
-       if (unlikely(IS_ERR(se_str)))
-           return -ENOMEM;
+       if (unlikely(!se_str))
+               return -ENOMEM;
        df->se_str = se_str;
 
        /* our own (refreshed) copy of se_rule */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to