mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ext4: fix buffer leak in __ext4_read_dirblock() on error path
commitde59fae004upstream. Fixes:dc6982ff4d("ext4: refactor code to read directory blocks ...") Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org # 3.9 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
82dfeb8d82
commit
d450fcdb42
@@ -124,6 +124,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
|
||||
if (!is_dx_block && type == INDEX) {
|
||||
ext4_error_inode(inode, func, line, block,
|
||||
"directory leaf block found instead of index block");
|
||||
brelse(bh);
|
||||
return ERR_PTR(-EFSCORRUPTED);
|
||||
}
|
||||
if (!ext4_has_metadata_csum(inode->i_sb) ||
|
||||
|
||||
Reference in New Issue
Block a user