diff options
author | Vasily Averin <[email protected]> | 2018-11-07 22:36:23 -0500 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2018-11-07 22:36:23 -0500 |
commit | de59fae0043f07de5d25e02ca360f7d57bfa5866 (patch) | |
tree | 3dc349c55a3f4a494d019d043a5a2fc7e273b56c | |
parent | 53692ec074d00589c2cf1d6d17ca76ad0adce6ec (diff) |
ext4: fix buffer leak in __ext4_read_dirblock() on error path
Fixes: dc6982ff4db1 ("ext4: refactor code to read directory blocks ...")
Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Cc: [email protected] # 3.9
-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 d388cce72db2..6a6b90363ef1 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -126,6 +126,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) || |