提交 ecaaf408 编写于 作者: V Vasily Averin 提交者: Theodore Ts'o

ext4: fix buffer leak in ext4_xattr_get_block() on error path

Fixes: dec214d0 ("ext4: xattr inode deduplication")
Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 4.13
上级 af18e35b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册