Skip to content

Commit 6bdc997

Browse files
vaverintytso
authored andcommitted
ext4: fix buffer leak in ext4_xattr_move_to_block() on error path
Fixes: 3f2571c ("ext4: factor out xattr moving") Fixes: 6dd4ee7 ("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
1 parent 45ae932 commit 6bdc997

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/ext4/xattr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,6 +2617,8 @@ static int ext4_xattr_move_to_block(handle_t *handle, struct inode *inode,
26172617
kfree(buffer);
26182618
if (is)
26192619
brelse(is->iloc.bh);
2620+
if (bs)
2621+
brelse(bs->bh);
26202622
kfree(is);
26212623
kfree(bs);
26222624

0 commit comments

Comments
 (0)