Re: [PATCH v2 1/3] spapr_pci: Fix memory leak of vmstate_spapr_pci

2020-12-28 Thread Michael S. Tsirkin
On Mon, Dec 28, 2020 at 05:00:51PM +0800, g00517791 wrote: > From: Jinhao Gao > > When VM migrate VMState of spapr_pci, the field(msi_devs) of spapr_pci > having a flag of VMS_ALLOC need to allocate memory. If the src doesn't free > memory of msi_devs in SaveStateEntry of spapr_pci after QEMUFile

[PATCH v2 1/3] spapr_pci: Fix memory leak of vmstate_spapr_pci

2020-12-28 Thread g00517791
From: Jinhao Gao When VM migrate VMState of spapr_pci, the field(msi_devs) of spapr_pci having a flag of VMS_ALLOC need to allocate memory. If the src doesn't free memory of msi_devs in SaveStateEntry of spapr_pci after QEMUFile save VMState of spapr_pci, it may result in memory leak of msi_devs.