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

Commit 9673f6f8 authored by Phanindra Babu Pabba's avatar Phanindra Babu Pabba
Browse files

fs: crypto: Fix the memory leak while eviction of inode



Incase of legacy data encryption mode, fix the logic
to clear the crypto transform buffer explicitly, inorder
to clear filename encryption key info during inode eviction.

Change-Id: I5874c4eb7d11365f775936a093d37003b50fc428
Signed-off-by: default avatarPhanindra Babu Pabba <pabba@codeaurora.org>
parent f24a5982
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -482,6 +482,7 @@ static void put_crypt_info(struct fscrypt_info *ci)
		    FSCRYPT_MODE_PRIVATE) {
			fscrypt_destroy_prepared_key(&ci->ci_key);
		} else {
			crypto_free_skcipher(ci->ci_key.tfm);
#ifdef CONFIG_FS_ENCRYPTION_INLINE_CRYPT
			if (ci->ci_key.blk_key)
				kzfree(ci->ci_key.blk_key);