* [PATCH] audit: fix kstrdup() error check
@ 2006-11-27 4:54 Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2006-11-27 4:54 UTC (permalink / raw)
To: linux-kernel; +Cc: David Woodhouse
kstrdup() returns NULL on error.
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
kernel/auditfilter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: work-fault-inject/kernel/auditfilter.c
===================================================================
--- work-fault-inject.orig/kernel/auditfilter.c
+++ work-fault-inject/kernel/auditfilter.c
@@ -800,8 +800,8 @@ static inline int audit_dupe_selinux_fie
/* 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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-27 5:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-27 4:54 [PATCH] audit: fix kstrdup() error check Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox