diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 302725176571..e66100848bb7 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -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; }