RE: [PATCH v4 01/12] nvdimm/pmem: Fix leak on dax_add_host() failure

Dan Williams
2024-02-08T21:28:47Z

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);
> put_dax(pmem->dax_dev);
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Looks good to me.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>