Re: [PATCH] vfio: Fix memory leak of hostwin

2021-11-16 Thread Peng Liang
On 11/17/2021 3:01 AM, Alex Williamson wrote: > On Tue, 16 Nov 2021 19:56:26 +0800 > Peng Liang wrote: > >> hostwin is allocated and added to hostwin_list in vfio_host_win_add, but >> it is only deleted from hostwin_list in vfio_host_win_del, which causes >> a memory leak. Also, freeing all elem

Re: [PATCH] vfio: Fix memory leak of hostwin

2021-11-16 Thread Alex Williamson
On Tue, 16 Nov 2021 19:56:26 +0800 Peng Liang wrote: > hostwin is allocated and added to hostwin_list in vfio_host_win_add, but > it is only deleted from hostwin_list in vfio_host_win_del, which causes > a memory leak. Also, freeing all elements in hostwin_list is missing in > vfio_disconnect_co

[PATCH] vfio: Fix memory leak of hostwin

2021-11-16 Thread Peng Liang
hostwin is allocated and added to hostwin_list in vfio_host_win_add, but it is only deleted from hostwin_list in vfio_host_win_del, which causes a memory leak. Also, freeing all elements in hostwin_list is missing in vfio_disconnect_container. Fix: 2e4109de8e58 ("vfio/spapr: Create DMA window dyn