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

2021-11-17 Thread Alex Williamson
On Wed, 17 Nov 2021 09:47:39 +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 v2] 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