direct-io.hg

changeset 11748:af1aa35265eb

[HVM] Fix resource leak in error path of AP bringup.
Based on a patch from Kouya Shimura.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Oct 12 14:28:59 2006 +0100 (2006-10-12)
parents 7f6ae888fb7a
children dcee7eca71af
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Thu Oct 12 14:27:20 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Thu Oct 12 14:28:59 2006 +0100
     1.3 @@ -653,15 +653,15 @@ int hvm_bringup_ap(int vcpuid, int tramp
     1.4      if ( rc != 0 )
     1.5      {
     1.6          DPRINTK("AP %d bringup failed in boot_vcpu %x.\n", vcpuid, rc);
     1.7 -        return rc;
     1.8 +        goto out;
     1.9      }
    1.10  
    1.11      if ( test_and_clear_bit(_VCPUF_down, &d->vcpu[vcpuid]->vcpu_flags) )
    1.12          vcpu_wake(d->vcpu[vcpuid]);
    1.13      DPRINTK("AP %d bringup suceeded.\n", vcpuid);
    1.14  
    1.15 + out:
    1.16      xfree(ctxt);
    1.17 -
    1.18      return rc;
    1.19  }
    1.20