Commit fec55c29 authored by Chunguang.xu's avatar Chunguang.xu Committed by Keith Busch
Browse files

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: fd1418de ("nvme-tcp: avoid open-coding nvme_tcp_teardown_admin_queue()")
Signed-off-by: default avatarChunguang.xu <chunguang.xu@shopee.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent ad0cf42e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}