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

2022-11-23 Thread xiujianfeng
Hi, 在 2022/11/23 22:53, Tarun Sahu 写道: Hi, Thanks for resolving it. All looks good. Except a thing, there is no check for return status of ksrdup too. that can also be part of this patch. Thanks for review, already sent v2. On Nov 23 2022, Xiu Jianfeng wrote: After changes in commit

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

2022-11-23 Thread Tarun Sahu
Hi, Thanks for resolving it. All looks good. Except a thing, there is no check for return status of ksrdup too. that can also be part of this patch. On Nov 23 2022, Xiu Jianfeng wrote: > After changes in commit 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique > name for bus provider"),

[PATCH] 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