mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[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>
This commit is contained in:
parent
5c95da9f5a
commit
3e1fbd12c9
1 changed files with 2 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue