Skip to content

Commit

Permalink
nvme-fc: remove double put reference if admin connect fails
Browse files Browse the repository at this point in the history
There are two put references in the failure case of initial
create_association. The first put actually frees the controller, thus the
second put references freed memory.

Remove the unnecessary 2nd put.

Signed-off-by: James Smart <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
jsmart-gh authored and Christoph Hellwig committed Dec 15, 2017
1 parent b224f61 commit 4596e75
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/nvme/host/fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3221,7 +3221,6 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,

/* initiate nvme ctrl ref counting teardown */
nvme_uninit_ctrl(&ctrl->ctrl);
nvme_put_ctrl(&ctrl->ctrl);

/* Remove core ctrl ref. */
nvme_put_ctrl(&ctrl->ctrl);
Expand Down

0 comments on commit 4596e75

Please sign in to comment.