diff options
-rw-r--r-- | security/selinux/hooks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 8ab5679a37a3..28ee187ed224 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -1754,7 +1754,8 @@ static inline void flush_unauthorized_files(struct files_struct * files) | |||
1754 | get_file(devnull); | 1754 | get_file(devnull); |
1755 | } else { | 1755 | } else { |
1756 | devnull = dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR); | 1756 | devnull = dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR); |
1757 | if (!devnull) { | 1757 | if (IS_ERR(devnull)) { |
1758 | devnull = NULL; | ||
1758 | put_unused_fd(fd); | 1759 | put_unused_fd(fd); |
1759 | fput(file); | 1760 | fput(file); |
1760 | continue; | 1761 | continue; |