Commit 4096fc09 authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

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

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>
parent 8113972d
......@@ -2626,6 +2626,8 @@ static int ext4_xattr_move_to_block(handle_t *handle, struct inode *inode,
kfree(buffer);
if (is)
brelse(is->iloc.bh);
if (bs)
brelse(bs->bh);
kfree(is);
kfree(bs);
......
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