diff options
| author | Vasily Averin <vvs@virtuozzo.com> | 2018-11-07 22:36:23 -0500 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-12-01 23:10:56 +0100 |
| commit | e185c6455145f411ea68633d89a2c42ecd8013f5 (patch) | |
| tree | 98b4ffc8661efaaf9afed2397256c8250a421704 /fs/ext4 | |
| parent | 96fadfec36d15c2b5fc620500ddcd848f8db5ed5 (diff) | |
ext4: fix buffer leak in __ext4_read_dirblock() on error path
commit de59fae0043f07de5d25e02ca360f7d57bfa5866 upstream.
Fixes: dc6982ff4db1 ("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>
Diffstat (limited to 'fs/ext4')
| -rw-r--r-- | fs/ext4/namei.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index a693265a7..a0096d9ef 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -122,6 +122,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(-EIO); } if (!ext4_has_metadata_csum(inode->i_sb) || |
