Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f0d1c16 authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

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



commit ecaaf408478b6fb4d9986f9b6652f3824e374f4c upstream.

Fixes: dec214d0 ("ext4: xattr inode deduplication")
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 4.13
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a992da5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2282,8 +2282,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;
}