ext4 crypto: clean up error handling in ext4_fname_setup_filename
authorTheodore Ts'o <tytso@google.com>
Fri, 29 May 2015 01:39:33 +0000 (21:39 -0400)
committerIan Chang <ianc@nvidia.com>
Wed, 1 Jun 2016 05:00:04 +0000 (13:00 +0800)
commitf57216308c061ca3235beeaba755c186de8be542
tree4b2a87abe25ca4be7e2bc129c370181ffd2c8301
parent3e9b4e07b8d17ba7d43b99b57d0f7e69e2552f27
ext4 crypto: clean up error handling in ext4_fname_setup_filename

Fix a potential memory leak where fname->crypto_buf.name wouldn't get
freed in some error paths, and also make the error handling easier to
understand/audit.

Change-Id: I251041ff2df61dcc2a818539783cfc0de2e2933a
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@google.com>
fs/ext4/crypto_fname.c