x86/vLAPIC: don't leak regs page from vlapic_init() upon error

Fixes: 8a981e0bf2 ("Make map_domain_page_global fail")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich authored and Andrew Cooper committed 2020-10-09 17:20:11 +01:00
1 parent 8a71d50ed4
commit 8a62dee9ce
1 file changed
+1
+1
View File
@@ -1625,6 +1625,7 @@ int vlapic_init(struct vcpu *v)
vlapic->regs = __map_domain_page_global(vlapic->regs_page);
if ( vlapic->regs == NULL )
{
free_domheap_page(vlapic->regs_page);
dprintk(XENLOG_ERR, "map vlapic regs error: %d/%d\n",
v->domain->domain_id, v->vcpu_id);
return -ENOMEM;
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.