提交 14d40569 编写于 作者: D Dan Carpenter 提交者: David Woodhouse

iommu/vt-d: returning free pointer in get_domain_for_dev()

If we hit this error condition then we want to return a NULL pointer and
not a freed variable.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 63b42624
......@@ -2257,6 +2257,7 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw)
goto error;
if (iommu_attach_domain(domain, iommu)) {
free_domain_mem(domain);
domain = NULL;
goto error;
}
free = domain;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册