Commit 75c8b19a authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Christoph Hellwig

nvme: fixup memory leak in nvme_init_identify()

If nvme_get_effects_log() failed the 'id' buffer from the previous
nvme_identify_ctrl() call will never be freed.
Signed-off-by: default avatarHannes Reinecke <[email protected]>
Reviewed-by: default avatarJohannes Thumshirn <[email protected]>
Signed-off-by: default avatarChristoph Hellwig <[email protected]>
parent 1e5f4461
......@@ -2316,7 +2316,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
ret = nvme_get_effects_log(ctrl);
if (ret < 0)
return ret;
goto out_free;
if (!ctrl->identified) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment