summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-11-07 11:10:21 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-21 09:27:43 +0100
commit27acd8f869ba92e70408168ed2bed504a99b154c (patch)
tree35f8cc5c05ddb40623e2a038f89424e52951c024 /fs/ext4
parent0d9902d43fb696d460c29ef4ee0b86ce6ddc9a15 (diff)
ext4: fix buffer leak in ext4_xattr_move_to_block() on error path
commit 6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4')
-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 1022c17fc1a1..53679716baca 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1490,6 +1490,8 @@ cleanup:
kfree(buffer);
if (is)
brelse(is->iloc.bh);
+ if (bs)
+ brelse(bs->bh);
kfree(is);
kfree(bs);
brelse(bh);