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

commit 6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f upstream.

Fixes: 3f2571c1f91f ("ext4: factor out xattr moving")
Fixes: 6dd4ee7cab ("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>
This commit is contained in:
Vasily Averin 2018-11-07 11:10:21 -05:00 committed by syphyr
parent f976aecfa3
commit 11abaf27fb
1 changed files with 2 additions and 0 deletions

View File

@ -1497,6 +1497,8 @@ cleanup:
kfree(buffer);
if (is)
brelse(is->iloc.bh);
if (bs)
brelse(bs->bh);
kfree(is);
kfree(bs);
brelse(bh);