mbox series

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

Message ID 20231121174051.63038-1-philmd@linaro.org
Headers show
Series hw: Free DEFINE_PROP_ARRAY()'s arrays in instance_finalize() | expand

Message

Philippe Mathieu-Daudé Nov. 21, 2023, 5:40 p.m. UTC
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(+)

Comments

Peter Maydell Nov. 27, 2023, 3:28 p.m. UTC | #1
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