Hello,
  This was originally a single patch to make the property array release
function free the property array instead of having the users free it
in their exit functions. This fixes leaks and reduces code overhead.
After review, Marc-André asked to include some work he did on
this earlier
(https://patchew.org/QEMU/[email protected]/).
I have included his patches that added unit testing and made some
release functions idempotent.

Chandan Somani (1):
  qdev: Free property array on release

Marc-André Lureau (4):
  qdev: make release_string() idempotent
  qdev: make release_drive() idempotent
  qdev: make release_tpm() idempotent
  tests: add /qdev/free-properties test

 backends/tpm/tpm_util.c           |  1 +
 block/accounting.c                |  1 -
 hw/core/qdev-properties-system.c  |  1 +
 hw/core/qdev-properties.c         | 24 ++++----
 hw/input/stellaris_gamepad.c      |  8 ---
 hw/intc/arm_gicv3_common.c        |  8 ---
 hw/intc/rx_icu.c                  |  8 ---
 hw/misc/arm_sysctl.c              |  2 -
 hw/misc/mps2-scc.c                |  8 ---
 hw/net/rocker/rocker.c            |  1 -
 hw/nvram/xlnx-efuse.c             |  8 ---
 hw/nvram/xlnx-versal-efuse-ctrl.c |  8 ---
 hw/virtio/virtio-iommu-pci.c      |  8 ---
 tests/unit/meson.build            |  1 +
 tests/unit/test-qdev.c            | 96 +++++++++++++++++++++++++++++++
 15 files changed, 111 insertions(+), 72 deletions(-)
 create mode 100644 tests/unit/test-qdev.c

-- 
2.51.1


Reply via email to