aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/messaging.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/messaging.c')
-rw-r--r--fs/ecryptfs/messaging.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c
index 8d7a577ae497..49ff8ea08f1c 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)
97void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx) 97void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx)
98{ 98{
99 list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list); 99 list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list);
100 if (msg_ctx->msg) 100 kfree(msg_ctx->msg);
101 kfree(msg_ctx->msg);
102 msg_ctx->msg = NULL; 101 msg_ctx->msg = NULL;
103 msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE; 102 msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE;
104} 103}
@@ -283,7 +282,7 @@ ecryptfs_send_message_locked(char *data, int data_len, u8 msg_type,
283 int rc; 282 int rc;
284 283
285 rc = ecryptfs_find_daemon_by_euid(&daemon); 284 rc = ecryptfs_find_daemon_by_euid(&daemon);
286 if (rc || !daemon) { 285 if (rc) {
287 rc = -ENOTCONN; 286 rc = -ENOTCONN;
288 goto out; 287 goto out;
289 } 288 }