summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2013-02-12 11:03:49 -0700
committerTyler Hicks <tyhicks@canonical.com>2013-02-12 10:09:11 -0800
commit1101d58669a92ed9c9f4c7281404fb1e067a1e28 (patch)
tree1b536f289f0b5463a71b764473e3fca1313aebbc
parent3a46741804a4226cd837d1246eed95d4161f7159 (diff)
downloadblackbird-obmc-linux-1101d58669a92ed9c9f4c7281404fb1e067a1e28.tar.gz
blackbird-obmc-linux-1101d58669a92ed9c9f4c7281404fb1e067a1e28.zip
ecryptfs: ecryptfs_msg_ctx_alloc_to_free(): remove kfree() redundant null check
smatch analysis: fs/ecryptfs/messaging.c:101 ecryptfs_msg_ctx_alloc_to_free() info: redundant null check on msg_ctx->msg calling kfree() Cc: Dustin Kirkland <dustin.kirkland@gazzang.com> Cc: ecryptfs@vger.kernel.org Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
-rw-r--r--fs/ecryptfs/messaging.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c
index 5fa2471796c2..d5c7297c5816 100644
--- a/fs/ecryptfs/messaging.c
+++ b/fs/ecryptfs/messaging.c
@@ -97,8 +97,7 @@ static void ecryptfs_msg_ctx_free_to_alloc(struct ecryptfs_msg_ctx *msg_ctx)
void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx)
{
list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list);
- if (msg_ctx->msg)
- kfree(msg_ctx->msg);
+ kfree(msg_ctx->msg);
msg_ctx->msg = NULL;
msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE;
}
OpenPOWER on IntegriCloud