summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-11-07 11:10:21 -0500
committerTheodore Ts'o <tytso@mit.edu>2018-11-07 11:10:21 -0500
commit6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f (patch)
tree751a07a961cca32dd6ecb550525303a40d7b469a /fs
parent45ae932d246f721e6584430017176cbcadfde610 (diff)
downloadlinux-6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f.tar.gz
linux-6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f.tar.bz2
linux-6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f.zip
ext4: fix buffer leak in ext4_xattr_move_to_block() on error path
Fixes: 3f2571c1f91f ("ext4: factor out xattr moving") Fixes: 6dd4ee7cab7e ("ext4: Expand extra_inodes space per ...") Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org # 2.6.23
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/xattr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 07b9a335c8eb..5c9bc0d85cc0 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -2617,6 +2617,8 @@ out:
kfree(buffer);
if (is)
brelse(is->iloc.bh);
+ if (bs)
+ brelse(bs->bh);
kfree(is);
kfree(bs);