[PATCH 01/14] nvme-core: remove duplicate kfree in init identify
Christoph Hellwig
hch at lst.de
Wed Feb 24 11:35:05 EST 2021
On Tue, Feb 16, 2021 at 04:10:19PM -0800, Chaitanya Kulkarni wrote:
> In nvme_init_identify() once we initialize nvme_mpath_init() we free
> the id with kfree(). This is needed since we just return from all the
> following calls to nvme_mpath_init(), that also makes kfree() call
> duplicate.
>
> Instead of returning after nvme_mpath_init() jump to the lable
> out_free and remove the duplicate call to the kfree() since out_free
> label already has one..
Hmm. I'd rather split nvme_init_identify. Rename the publically
called function to something like nvme_init_ctrl_finish, and
the split out a nvme_init_identify for just the section that deals
with the id_ns data.
More information about the Linux-nvme
mailing list