Skip to content
Commit 7ca4b085 authored by Luís Henriques's avatar Luís Henriques Committed by Theodore Ts'o
Browse files

ext4: fix memory leaks in ext4_fname_{setup_filename,prepare_lookup}



If the filename casefolding fails, we'll be leaking memory from the
fscrypt_name struct, namely from the 'crypto_buf.name' member.

Make sure we free it in the error path on both ext4_fname_setup_filename()
and ext4_fname_prepare_lookup() functions.

Cc: stable@kernel.org
Fixes: 1ae98e29 ("ext4: optimize match for casefolded encrypted dirs")
Signed-off-by: default avatarLuís Henriques <lhenriques@suse.de>
Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20230803091713.13239-1-lhenriques@suse.de


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 5f02a30e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment