提交 3edc8376 编写于 作者: G Geyslan G. Bem 提交者: Tyler Hicks

ecryptfs: Fix memory leakage in keystore.c

In 'decrypt_pki_encrypted_session_key' function:

Initializes 'payload' pointer and releases it on exit.
Signed-off-by: NGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
Cc: stable@vger.kernel.org # v2.6.28+
上级 d6099aeb
......@@ -1149,7 +1149,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
struct ecryptfs_msg_ctx *msg_ctx;
struct ecryptfs_message *msg = NULL;
char *auth_tok_sig;
char *payload;
char *payload = NULL;
size_t payload_len = 0;
int rc;
......@@ -1203,6 +1203,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
}
out:
kfree(msg);
kfree(payload);
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册