[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] vfio-ccw: plug memory leak while getting region info
From: |
Cornelia Huck |
Subject: |
Re: [PATCH] vfio-ccw: plug memory leak while getting region info |
Date: |
Tue, 29 Sep 2020 12:12:57 +0200 |
On Mon, 28 Sep 2020 12:17:01 +0200
Cornelia Huck <cohuck@redhat.com> wrote:
> vfio_get_dev_region_info() unconditionally allocates memory
> for a passed-in vfio_region_info structure (and does not re-use
> an already allocated structure). Therefore, we have to free
> the structure we pass to that function in vfio_ccw_get_region()
> for every region we successfully obtained information for.
>
> Reported-by: Alex Williamson <alex.williamson@redhat.com>
> Fixes: 8fadea24de4e ("vfio-ccw: support async command subregion")
> Fixes: 46ea3841edaf ("vfio-ccw: Add support for the schib region")
> Fixes: f030532f2ad6 ("vfio-ccw: Add support for the CRW region and IRQ")
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> hw/vfio/ccw.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Queued to s390-next.