Re: [PATCH] cxl/region: Fix cxlr_pmem leaks

From: Markus Elfring
Date: Wed May 01 2024 - 15:23:48 EST


> Before this error path, cxlr_pmem pointed to a kzalloc() memory, free
> it to avoid this memory leaking.

Can the following wording be a bit nicer?

The local variable “cxlr_pmem” referred to dynamically allocated memory.
Free it in one error case before it is reset to an error pointer.


Would the summary phrase “Fix a memory leak in cxl_pmem_region_alloc()”
be more appropriate here?

Regards,
Markus