ia64/xen-unstable

changeset 18506:f163138e3340

x86, microcode: Free microcode_info struct at end of hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Sep 16 13:49:16 2008 +0100 (2008-09-16)
parents 879330497672
children d7be37824fe0
files xen/arch/x86/microcode.c
line diff
     1.1 --- a/xen/arch/x86/microcode.c	Tue Sep 16 13:40:59 2008 +0100
     1.2 +++ b/xen/arch/x86/microcode.c	Tue Sep 16 13:49:16 2008 +0100
     1.3 @@ -147,10 +147,13 @@ static long do_microcode_update(void *_i
     1.4          info->error = error;
     1.5  
     1.6      info->cpu = next_cpu(info->cpu, cpu_online_map);
     1.7 -    if ( info->cpu >= NR_CPUS )
     1.8 -        return info->error;
     1.9 +    if ( info->cpu < NR_CPUS )
    1.10 +        return continue_hypercall_on_cpu(info->cpu, do_microcode_update, info);
    1.11  
    1.12 -    return continue_hypercall_on_cpu(info->cpu, do_microcode_update, info);
    1.13 +    error = info->error;
    1.14 +    xfree(info);
    1.15 +    return error;
    1.16 +
    1.17  }
    1.18  
    1.19  int microcode_update(XEN_GUEST_HANDLE(const_void) buf, unsigned long len)