]>
projects
/
xen.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
623c365
)
xen/domain: fix memory leak in domain_create()
author
Denis Mukhin
<dmukhin@ford.com>
Mon, 23 Jun 2025 08:50:33 +0000
(10:50 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Mon, 23 Jun 2025 08:50:33 +0000
(10:50 +0200)
Fix potential memory leak in domain_create() in late hardware domain case.
Fixes: b959f3b820f5 ("xen: introduce hardware domain create flag")
Signed-off-by: Denis Mukhin <dmukhin@ford.com>
xen/common/domain.c
patch
|
blob
|
blame
|
history
diff --git
a/xen/common/domain.c
b/xen/common/domain.c
index 434d32901b1b22ea42f7e86f9f71b9536e697d46..8c8f70347a916407841f7817f3bfb21267260a91 100644
(file)
--- a/
xen/common/domain.c
+++ b/
xen/common/domain.c
@@
-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;