Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Fabian Frederick and committed by
Tyler Hicks
3db593e8 c4cf3ba4

+1 -2
+1 -2
fs/ecryptfs/messaging.c
··· 434 434 mutex_lock(&ecryptfs_msg_ctx_lists_mux); 435 435 for (i = 0; i < ecryptfs_message_buf_len; i++) { 436 436 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); 439 438 mutex_unlock(&ecryptfs_msg_ctx_arr[i].mux); 440 439 } 441 440 kfree(ecryptfs_msg_ctx_arr);