Re: [PATCH] drivers: nvdimm: fix memleak

2023-08-17 Thread Dave Jiang
On 8/17/23 04:59, Konstantin Meskhidze wrote: Memory pointed by 'nd_pmu->pmu.attr_groups' is allocated in function 'register_nvdimm_pmu' and is lost after 'kfree(nd_pmu)' call in function 'unregister_nvdimm_pmu'. Co-developed-by: Ivanov Mikhail Signed-off-by: Konstantin Meskhidze Applied

RE: [PATCH] drivers: nvdimm: fix memleak

2023-08-17 Thread Dan Williams
[ add Kajol and Madhavan ] Konstantin Meskhidze wrote: > Memory pointed by 'nd_pmu->pmu.attr_groups' is allocated in function > 'register_nvdimm_pmu' and is lost after 'kfree(nd_pmu)' call in function > 'unregister_nvdimm_pmu'. Yes, looks like a real issue, but also completely avoidable by using

Re: [PATCH] drivers: nvdimm: fix memleak

2023-08-17 Thread Jeff Moyer
Konstantin Meskhidze writes: > Memory pointed by 'nd_pmu->pmu.attr_groups' is allocated in function > 'register_nvdimm_pmu' and is lost after 'kfree(nd_pmu)' call in function > 'unregister_nvdimm_pmu'. > > Co-developed-by: Ivanov Mikhail > Signed-off-by: Konstantin Meskhidze > --- > drivers/nv

[PATCH] drivers: nvdimm: fix memleak

2023-08-17 Thread Konstantin Meskhidze
Memory pointed by 'nd_pmu->pmu.attr_groups' is allocated in function 'register_nvdimm_pmu' and is lost after 'kfree(nd_pmu)' call in function 'unregister_nvdimm_pmu'. Co-developed-by: Ivanov Mikhail Signed-off-by: Konstantin Meskhidze --- drivers/nvdimm/nd_perf.c | 1 + 1 file changed, 1 insert