Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3edc8376 authored by Geyslan G. Bem's avatar Geyslan G. Bem Committed by Tyler Hicks
Browse files

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: default avatarGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
Cc: stable@vger.kernel.org # v2.6.28+
parent d6099aeb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
}