Peter Maydell reported both these issues, having looked into Coverity identified issues. The memory leak was straight forward, but testing the second patch identified a bug in the Linux kernel.
This bug has been fixed in the series https://lore.kernel.org/linux-cxl/165973125417.1526540.14425647258796609596.st...@dwillia2-xfh.jf.intel.com/T/#t and is now available in the cxl.git pending branch. Another clear example of why QEMU emulation is useful for kernel development. Jonathan Cameron (2): hw/cxl: Fix memory leak in error paths hw/cxl: Fix wrong query of target ports hw/cxl/cxl-host.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) -- 2.32.0