From 1b7c0f54d0c9491d8c3329955722a18e07247ed2 Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Wed, 28 Nov 2018 18:14:56 +0800 Subject: [PATCH] nvmf/tcp: add an assert for transport destroy. Add a check, which will be required for the further unit test. Change-Id: Ib1987fef914e6546f2bdbacd23bf9bb6005b8155 Signed-off-by: Ziye Yang Reviewed-on: https://review.gerrithub.io/435197 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu --- lib/nvmf/tcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nvmf/tcp.c b/lib/nvmf/tcp.c index c9f0acdf33..d0995f7b4e 100644 --- a/lib/nvmf/tcp.c +++ b/lib/nvmf/tcp.c @@ -608,6 +608,7 @@ spdk_nvmf_tcp_destroy(struct spdk_nvmf_transport *transport) { struct spdk_nvmf_tcp_transport *ttransport; + assert(transport != NULL); ttransport = SPDK_CONTAINEROF(transport, struct spdk_nvmf_tcp_transport, transport); if (spdk_mempool_count(ttransport->data_buf_pool) != (ttransport->max_queue_depth * 4)) {