Re: [PATCH v2] libnvdimm/of_pmem: Fix memory leak in of_pmem_region_probe()

2022-11-23 Thread Tarun Sahu
Hi, Look all good to me. Reviewed-by: Tarun Sahu On Nov 23 2022, Xiu Jianfeng wrote: > After changes in commit 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique > name for bus provider"), @priv->bus_desc.provider_name is no longer a > const string, but a dynamic string allocated by kstrdup(),

[PATCH v2] libnvdimm/of_pmem: Fix memory leak in of_pmem_region_probe()

2022-11-23 Thread Xiu Jianfeng
After changes in commit 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus provider"), @priv->bus_desc.provider_name is no longer a const string, but a dynamic string allocated by kstrdup(), it should be freed on the error path, and when driver is removed. Fixes: 49bddc73d15c