]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/nvram/xlnx-efuse-ctrl: Free XlnxVersalEFuseCtrl[] "pg0-lock" array
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 21 Nov 2023 17:40:50 +0000 (18:40 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 20 Dec 2023 16:11:10 +0000 (19:11 +0300)
commit06239e69e8f9d11743fc1332691dc5fa10f48a78
treee5815aa19dfd3b167f260d6a11392d8e0e7f6608
parentb1c78530ae7c00cd39cdf115516a9ba737046cf2
hw/nvram/xlnx-efuse-ctrl: Free XlnxVersalEFuseCtrl[] "pg0-lock" array

Commit 0be6bfac62 ("qdev: Implement variable length array properties")
added the DEFINE_PROP_ARRAY() macro with the following comment:

  * It is the responsibility of the device deinit code to free the
  * @_arrayfield memory.

Commit 9e4aa1fafe added:

  DEFINE_PROP_ARRAY("pg0-lock",
                    XlnxVersalEFuseCtrl, extra_pg0_lock_n16,
                    extra_pg0_lock_spec, qdev_prop_uint16, uint16_t),

but forgot to free the 'extra_pg0_lock_spec' array. Do it in the
instance_finalize() handler.

Cc: qemu-stable@nongnu.org
Fixes: 9e4aa1fafe ("hw/nvram: Xilinx Versal eFuse device") # v6.2.0+
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231121174051.63038-6-philmd@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 4f10c66077e39969940d928077560665e155cac8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/nvram/xlnx-versal-efuse-ctrl.c