[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 3/6] microcode: delete 'mc' field from struct ucode_cpu_info
On Wed, Nov 28, 2018 at 01:34:13PM +0800, Chao Gao wrote: > diff --git a/xen/arch/x86/microcode_intel.c b/xen/arch/x86/microcode_intel.c > index c4f812f..1857332 100644 > --- a/xen/arch/x86/microcode_intel.c > +++ b/xen/arch/x86/microcode_intel.c > @@ -296,9 +296,8 @@ static int get_matching_microcode(const void *mc, > unsigned int cpu) > struct ucode_cpu_info *uci = &per_cpu(ucode_cpu_info, cpu); > const struct microcode_header_intel *mc_header = mc; > unsigned long total_size = get_totalsize(mc_header); > - void *new_mc; > struct ucode_patch *ucode_patch = xmalloc(struct ucode_patch); > - void *new_mc2 = xmalloc_bytes(total_size); > + void *new_mc = xmalloc_bytes(total_size); > > /* > * Save this microcode before checking the signature. It is to > @@ -309,16 +308,16 @@ static int get_matching_microcode(const void *mc, > unsigned int cpu) > * Instead, they just load the matched and latest microcode in > * the caches. > */ > - if ( !ucode_patch || !new_mc2 ) > + if ( !ucode_patch || !new_mc ) > { > printk(KERN_ERR "microcode: error! Can not allocate memory\n"); > return -ENOMEM; I know this is exiting code, but it's leaking memory... _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |