mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ecryptfs: Fix memory leakage in keystore.c
commit 3edc8376c0
upstream.
In 'decrypt_pki_encrypted_session_key' function:
Initializes 'payload' pointer and releases it on exit.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Rui Xiang <rui.xiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
47532a2912
commit
2e4191b310
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
int rc;
|
||||
|
||||
|
@ -1204,6 +1204,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
|
|||
out:
|
||||
if (msg)
|
||||
kfree(msg);
|
||||
kfree(payload);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue