[PATCH-for-8.2 0/6] hw: Free DEFINE_PROP_ARRAY()'s arrays in instance_finalize()

Philippe Mathieu-Daudé posted 6 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231121174051.63038-1-philmd@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Alistair Francis <alistair@alistair23.me>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Eric Auger <eric.auger@redhat.com>
include/hw/virtio/virtio-pci.h    | 1 +
hw/input/stellaris_gamepad.c      | 8 ++++++++
hw/misc/mps2-scc.c                | 8 ++++++++
hw/nvram/xlnx-efuse.c             | 8 ++++++++
hw/nvram/xlnx-versal-efuse-ctrl.c | 8 ++++++++
hw/virtio/virtio-iommu-pci.c      | 8 ++++++++
hw/virtio/virtio-pci.c            | 1 +
7 files changed, 42 insertions(+)
[PATCH-for-8.2 0/6] hw: Free DEFINE_PROP_ARRAY()'s arrays in instance_finalize()
Posted by Philippe Mathieu-Daudé 1 year ago
In few places we forget to free the array allocated by the
DEFINE_PROP_ARRAY() macro handlers. Fix that.

Philippe Mathieu-Daudé (6):
  hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field
  hw/virtio: Free VirtIOIOMMUPCI::vdev.reserved_regions[] on finalize()
  hw/misc/mps2-scc: Free MPS2SCC::oscclk[] array on finalize()
  hw/nvram/xlnx-efuse: Free XlnxEFuse::ro_bits[] array on finalize()
  hw/nvram/xlnx-efuse-ctrl: Free XlnxVersalEFuseCtrl[] "pg0-lock" array
  hw/input/stellaris_gamepad: Free StellarisGamepad::keycodes[] array

 include/hw/virtio/virtio-pci.h    | 1 +
 hw/input/stellaris_gamepad.c      | 8 ++++++++
 hw/misc/mps2-scc.c                | 8 ++++++++
 hw/nvram/xlnx-efuse.c             | 8 ++++++++
 hw/nvram/xlnx-versal-efuse-ctrl.c | 8 ++++++++
 hw/virtio/virtio-iommu-pci.c      | 8 ++++++++
 hw/virtio/virtio-pci.c            | 1 +
 7 files changed, 42 insertions(+)

-- 
2.41.0


Re: [PATCH-for-8.2 0/6] hw: Free DEFINE_PROP_ARRAY()'s arrays in instance_finalize()
Posted by Peter Maydell 1 year ago
On Tue, 21 Nov 2023 at 17:40, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> In few places we forget to free the array allocated by the
> DEFINE_PROP_ARRAY() macro handlers. Fix that.
>
> Philippe Mathieu-Daudé (6):
>   hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field
>   hw/virtio: Free VirtIOIOMMUPCI::vdev.reserved_regions[] on finalize()
>   hw/misc/mps2-scc: Free MPS2SCC::oscclk[] array on finalize()
>   hw/nvram/xlnx-efuse: Free XlnxEFuse::ro_bits[] array on finalize()
>   hw/nvram/xlnx-efuse-ctrl: Free XlnxVersalEFuseCtrl[] "pg0-lock" array
>   hw/input/stellaris_gamepad: Free StellarisGamepad::keycodes[] array

Applied to target-arm.next, thanks.

-- PMM