Skip to content

Commit

Permalink
fs/ecryptfs/messaging.c: remove null test before kfree
Browse files Browse the repository at this point in the history
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Signed-off-by: Fabian Frederick <[email protected]>
Cc: [email protected]
Signed-off-by: Tyler Hicks <[email protected]>
  • Loading branch information
Fabian Frederick authored and tyhicks committed Jul 3, 2014
1 parent c4cf3ba commit 3db593e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ecryptfs/messaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,7 @@ void ecryptfs_release_messaging(void)
mutex_lock(&ecryptfs_msg_ctx_lists_mux);
for (i = 0; i < ecryptfs_message_buf_len; i++) {
mutex_lock(&ecryptfs_msg_ctx_arr[i].mux);
if (ecryptfs_msg_ctx_arr[i].msg)
kfree(ecryptfs_msg_ctx_arr[i].msg);
kfree(ecryptfs_msg_ctx_arr[i].msg);
mutex_unlock(&ecryptfs_msg_ctx_arr[i].mux);
}
kfree(ecryptfs_msg_ctx_arr);
Expand Down

0 comments on commit 3db593e

Please sign in to comment.