Skip to content

Commit 3db593e

Browse files
Fabian Fredericktyhicks
authored andcommitted
fs/ecryptfs/messaging.c: remove null test before kfree
Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: ecryptfs@vger.kernel.org Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
1 parent c4cf3ba commit 3db593e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/ecryptfs/messaging.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,7 @@ void ecryptfs_release_messaging(void)
434434
mutex_lock(&ecryptfs_msg_ctx_lists_mux);
435435
for (i = 0; i < ecryptfs_message_buf_len; i++) {
436436
mutex_lock(&ecryptfs_msg_ctx_arr[i].mux);
437-
if (ecryptfs_msg_ctx_arr[i].msg)
438-
kfree(ecryptfs_msg_ctx_arr[i].msg);
437+
kfree(ecryptfs_msg_ctx_arr[i].msg);
439438
mutex_unlock(&ecryptfs_msg_ctx_arr[i].mux);
440439
}
441440
kfree(ecryptfs_msg_ctx_arr);

0 commit comments

Comments
 (0)