nvmf: fix up scan-build workaround
The code that actually removed items from the list was removed in addition to the free() call, which caused a hang on shutdown. Change-Id: If0e843d0d0ebfa28638b12104da880e70b3e548a Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
91330eb5c8
commit
3c4cb4ea53
@ -144,7 +144,6 @@ spdk_nvmf_port_create(int tag)
|
||||
void
|
||||
spdk_nvmf_port_destroy(struct spdk_nvmf_port *port)
|
||||
{
|
||||
#if 0 // TODO: fix bogus scan-build warning about use-after-free
|
||||
struct spdk_nvmf_fabric_intf *fabric_intf;
|
||||
|
||||
RTE_VERIFY(port != NULL);
|
||||
@ -153,11 +152,14 @@ spdk_nvmf_port_destroy(struct spdk_nvmf_port *port)
|
||||
while (!TAILQ_EMPTY(&port->head)) {
|
||||
fabric_intf = TAILQ_FIRST(&port->head);
|
||||
TAILQ_REMOVE(&port->head, fabric_intf, tailq);
|
||||
#if 0 // TODO: fix bogus scan-build warning about use-after-free
|
||||
spdk_nvmf_fabric_intf_destroy(fabric_intf);
|
||||
#endif
|
||||
}
|
||||
|
||||
TAILQ_REMOVE(&g_port_head, port, tailq);
|
||||
|
||||
#if 0 // TODO: fix bogus scan-build warning about use-after-free
|
||||
free(port);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user