qemu/hw/cxl
Jonathan Cameron 7b22a3218a hw/cxl: cdat: Fix failure to free buffer in erorr paths
The failure paths in CDAT file loading did not clear up properly.
Change to using g_auto_free and a local pointer for the buffer to
ensure this function has no side effects on error.
Also drop some unnecessary checks that can not fail.

Cleanup properly after a failure to load a CDAT file.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20230421132020.7408-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-05-19 01:36:09 -04:00
..
cxl-cdat.c hw/cxl: cdat: Fix failure to free buffer in erorr paths 2023-05-19 01:36:09 -04:00
cxl-component-utils.c hw/mem/cxl_type3: Add CXL RAS Error Injection Support. 2023-03-07 12:39:00 -05:00
cxl-device-utils.c hw/cxl/mailbox: Use new UUID network order define for cel_uuid 2023-03-02 19:13:52 -05:00
cxl-host-stubs.c pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup. 2022-06-09 19:32:49 -04:00
cxl-host.c hw/pci-bridge: Make PCIe and CXL PXB Devices inherit from TYPE_PXB_DEV 2023-04-24 22:56:55 -04:00
cxl-mailbox-utils.c hw/cxl/mailbox: Use new UUID network order define for cel_uuid 2023-03-02 19:13:52 -05:00
Kconfig
meson.build hw/cxl/cdat: CXL CDAT Data Object Exchange implementation 2022-11-07 13:12:19 -05:00