> -----Original Message-----
> From: Wei Liu [mailto:[email protected]]
> Sent: 02 January 2019 15:55
> To: Paul Durrant <[email protected]>
> Cc: [email protected]; Jan Beulich <[email protected]>;
> Andrew Cooper <[email protected]>; Wei Liu <[email protected]>;
> Roger Pau Monne <[email protected]>
> Subject: Re: [PATCH 2/8] viridian: separately allocate domain and vcpu
> structures
> 
> On Thu, Dec 20, 2018 at 04:33:39PM +0000, Paul Durrant wrote:
> >
> >  void viridian_vcpu_deinit(struct vcpu *v)
> >  {
> > -    viridian_synic_wrmsr(v, HV_X64_MSR_VP_ASSIST_PAGE, 0);
> > +    if ( !v->arch.hvm.viridian )
> > +        return;
> > +
> > +    if ( is_viridian_vcpu(v) )
> > +        viridian_synic_wrmsr(v, HV_X64_MSR_VP_ASSIST_PAGE, 0);
> > +
> > +    xfree(v->arch.hvm.viridian);
> > +    v->arch.hvm.viridian = NULL;
> 
> Please use XFREE() here and below.

Ooh, I didn't know about that bit of macro magic.

> 
> With it fixed:
> 
> Reviewed-by: Wei Liu <[email protected]>

Thanks,

  Paul

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to