Commit 6df8496a authored by Vasily Averin's avatar Vasily Averin Committed by Kleber Sacilotto de Souza

ext4: fix buffer leak in ext4_xattr_move_to_block() on error path

BugLink: https://bugs.launchpad.net/bugs/1810947

commit 6bdc9977 upstream.

Fixes: 3f2571c1 ("ext4: factor out xattr moving")
Fixes: 6dd4ee7c ("ext4: Expand extra_inodes space per ...")
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 2.6.23
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 4d73be73
...@@ -1552,6 +1552,8 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize, ...@@ -1552,6 +1552,8 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
kfree(buffer); kfree(buffer);
if (is) if (is)
brelse(is->iloc.bh); brelse(is->iloc.bh);
if (bs)
brelse(bs->bh);
kfree(is); kfree(is);
kfree(bs); kfree(bs);
brelse(bh); brelse(bh);
......
Markdown is supported
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