Skip to content

Commit fec55c2

Browse files
Chunguang.xukeithbusch
Chunguang.xu
authored andcommitted
nvme-tcp: fix the memleak while create new ctrl failed
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]>
1 parent ad0cf42 commit fec55c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/tcp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
22782278
}
22792279
destroy_admin:
22802280
nvme_stop_keep_alive(ctrl);
2281-
nvme_tcp_teardown_admin_queue(ctrl, false);
2281+
nvme_tcp_teardown_admin_queue(ctrl, new);
22822282
return ret;
22832283
}
22842284

0 commit comments

Comments
 (0)