mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
ext4: fix buffer leak in ext4_xattr_get_block() on error path
Fixes: dec214d00e
("ext4: xattr inode deduplication")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 4.13
This commit is contained in:
parent
af18e35bfd
commit
ecaaf40847
1 changed files with 3 additions and 1 deletions
|
@ -2272,8 +2272,10 @@ static struct buffer_head *ext4_xattr_get_block(struct inode *inode)
|
|||
if (!bh)
|
||||
return ERR_PTR(-EIO);
|
||||
error = ext4_xattr_check_block(inode, bh);
|
||||
if (error)
|
||||
if (error) {
|
||||
brelse(bh);
|
||||
return ERR_PTR(error);
|
||||
}
|
||||
return bh;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue