aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-22 04:10:02 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-22 11:55:49 -0500
commit3e1fbd12c958591695f89b11f9c6ec08d002e358 (patch)
tree9b830a3a3ada95b25ef0d0c3d6d306eb18dda066 /kernel
parent5c95da9f5abeff865b7273b59e1a3c50a2c5acb2 (diff)
[PATCH] audit: fix kstrdup() error check
kstrdup() returns NULL on error. Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 2e896f8ae29..9c8c23227c7 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -800,8 +800,8 @@ static inline int audit_dupe_selinux_field(struct audit_field *df,
800 800
801 /* our own copy of se_str */ 801 /* our own copy of se_str */
802 se_str = kstrdup(sf->se_str, GFP_KERNEL); 802 se_str = kstrdup(sf->se_str, GFP_KERNEL);
803 if (unlikely(IS_ERR(se_str))) 803 if (unlikely(!se_str))
804 return -ENOMEM; 804 return -ENOMEM;
805 df->se_str = se_str; 805 df->se_str = se_str;
806 806
807 /* our own (refreshed) copy of se_rule */ 807 /* our own (refreshed) copy of se_rule */