Re: [PATCH 2/2] hw/cxl: cdat: Fix failure to free buffer in erorr paths

2023-05-16 Thread Fan Ni
On Fri, Apr 21, 2023 at 02:20:20PM +0100, Jonathan Cameron via wrote: > 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

[PATCH 2/2] hw/cxl: cdat: Fix failure to free buffer in erorr paths

2023-04-21 Thread Jonathan Cameron via
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. Suggest