xen/domain: fix memory leak in domain_create()

Fix potential memory leak in domain_create() in late hardware domain case.

Fixes: b959f3b820 ("xen: introduce hardware domain create flag")
Signed-off-by: Denis Mukhin <dmukhin@ford.com>
This commit is contained in:
Denis Mukhin authored and Jan Beulich committed 2025-06-23 10:50:33 +02:00
1 parent 623c365951
commit 3491e85a15
1 file changed
+3
+3
View File
@@ -825,7 +825,10 @@ struct domain *domain_create(domid_t domid,
/* late_hwdom is only allowed for dom0. */
if ( hardware_domain && hardware_domain->domain_id )
{
free_domain_struct(d);
return ERR_PTR(-EINVAL);
}
old_hwdom = hardware_domain;
hardware_domain = d;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.