mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
ext4: fix buffer leak in ext4_xattr_get_block() on error path
commitecaaf40847upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
181224f970
commit
70ca35b44a
@@ -2281,8 +2281,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user