summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-11-07 19:10:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-21 11:26:02 +0300
commit82dfeb8d8254f213c8d86fe03458c94590560f90 (patch)
tree5977f3089188e53e6c3bff4c284e4deb14b952b6
parentb66102a457de28cc58033de0eaaff8f1153621a1 (diff)
downloadlinux-82dfeb8d8254f213c8d86fe03458c94590560f90.tar.xz
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>
-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 9d92f7343585..22f765069655 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1393,6 +1393,8 @@ out:
kfree(buffer);
if (is)
brelse(is->iloc.bh);
+ if (bs)
+ brelse(bs->bh);
kfree(is);
kfree(bs);