From: Jan Beulich Date: Wed, 7 Mar 2012 09:59:18 +0000 (+0100) Subject: passthrough: fix domain ref leak after 24888:71159fb049f2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e45066d3c3fff98ed502546bd3152541eab16b07;p=xen.git passthrough: fix domain ref leak after 24888:71159fb049f2 As pointed out by Keir. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 890cb81cdb..82488d3e9f 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -580,6 +580,8 @@ int iommu_do_domctl( printk(XENLOG_G_ERR "XEN_DOMCTL_assign_device: get_domain_by_id() failed\n"); ret = -EINVAL; + if ( d ) + goto assign_device_out; break; }