qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v26 04/17] vfio: Add migration region initialization and fina


From: Cornelia Huck
Subject: Re: [PATCH v26 04/17] vfio: Add migration region initialization and finalize function
Date: Mon, 28 Sep 2020 11:39:49 +0200

On Fri, 25 Sep 2020 14:20:06 -0600
Alex Williamson <alex.williamson@redhat.com> wrote:

> On Wed, 23 Sep 2020 04:54:06 +0530
> Kirti Wankhede <kwankhede@nvidia.com> wrote:

> > +int vfio_migration_probe(VFIODevice *vbasedev, Error **errp)
> > +{
> > +    struct vfio_region_info *info = NULL;  
> 
> Not sure this initialization is strictly necessary either, but it also
> seems to be a common convention for this function, so either way.
> 
> Connie, does vfio_ccw_get_region() leak this?  It appears to call
> vfio_get_dev_region_info() and vfio_get_region_info() several times with
> the same pointer without freeing it between uses.

Ugh, indeed, info is reallocated without freeing it inbetween. I'll
cook up a patch, thanks for spotting.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]