diff options
author | Tyler Hicks | 2013-02-27 20:37:48 +0100 |
---|---|---|
committer | Tyler Hicks | 2013-02-27 20:41:18 +0100 |
commit | 1111eae90fb64a9d9ed133e410712f1e34fdce4a (patch) | |
tree | 6a98de6920ac6eb7e92d076edb3265bfc931be72 | |
parent | ecryptfs: ecryptfs_msg_ctx_alloc_to_free(): remove kfree() redundant null check (diff) | |
download | kernel-qcow2-linux-1111eae90fb64a9d9ed133e410712f1e34fdce4a.tar.gz kernel-qcow2-linux-1111eae90fb64a9d9ed133e410712f1e34fdce4a.tar.xz kernel-qcow2-linux-1111eae90fb64a9d9ed133e410712f1e34fdce4a.zip |
eCryptfs: Fix redundant error check on ecryptfs_find_daemon_by_euid()
It is sufficient to check the return code of
ecryptfs_find_daemon_by_euid(). If it returns 0, it always sets the
daemon pointer to point to a valid ecryptfs_daemon.
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Kees Cook <keescook@chromium.org>
-rw-r--r-- | fs/ecryptfs/messaging.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index d5c7297c5816..474051bd8d92 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c @@ -283,7 +283,7 @@ ecryptfs_send_message_locked(char *data, int data_len, u8 msg_type, int rc; rc = ecryptfs_find_daemon_by_euid(&daemon); - if (rc || !daemon) { + if (rc) { rc = -ENOTCONN; goto out; } |