Re: [PATCH] nvdimm/pmem: Fix leak on dax_add_host() failure

2024-02-12 Thread fan
On Mon, Feb 12, 2024 at 11:27:22AM -0500, Mathieu Desnoyers wrote: > Fix a leak on dax_add_host() error, where "goto out_cleanup_dax" is done > before setting pmem->dax_dev, which therefore issues the two following > calls on NULL pointers: > > out_cleanup_dax: > kill_dax(pmem->dax_dev);

Re: [PATCH] nvdimm/pmem: Fix leak on dax_add_host() failure

2024-02-12 Thread Dave Jiang
On 2/12/24 9:27 AM, Mathieu Desnoyers wrote: > Fix a leak on dax_add_host() error, where "goto out_cleanup_dax" is done > before setting pmem->dax_dev, which therefore issues the two following > calls on NULL pointers: > > out_cleanup_dax: > kill_dax(pmem->dax_dev); >

[PATCH] nvdimm/pmem: Fix leak on dax_add_host() failure

2024-02-12 Thread Mathieu Desnoyers
Fix a leak on dax_add_host() error, where "goto out_cleanup_dax" is done before setting pmem->dax_dev, which therefore issues the two following calls on NULL pointers: out_cleanup_dax: kill_dax(pmem->dax_dev); put_dax(pmem->dax_dev); Signed-off-by: Mathieu Desnoyers Reviewed-by: