Skip to content

Commit

Permalink
nvme-tcp: fix the memleak while create new ctrl failed
Browse files Browse the repository at this point in the history
Now while we create new ctrl failed, we have not free the
tagset occupied by admin_q, here try to fix it.

Fixes: fd1418d ("nvme-tcp: avoid open-coding nvme_tcp_teardown_admin_queue()")
Signed-off-by: Chunguang.xu <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
  • Loading branch information
Chunguang.xu authored and keithbusch committed Dec 4, 2024
1 parent ad0cf42 commit fec55c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
}
destroy_admin:
nvme_stop_keep_alive(ctrl);
nvme_tcp_teardown_admin_queue(ctrl, false);
nvme_tcp_teardown_admin_queue(ctrl, new);
return ret;
}

Expand Down

0 comments on commit fec55c2

Please sign in to comment.