From 4a003433d0372c36ee9b9446d8a7c79692c5f484 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 12 Aug 2021 09:34:15 +0200 Subject: [PATCH] fabrics: fixup controller name on disconnect We cannot reference the controller once it's disconnected; use the argument instead. Signed-off-by: Hannes Reinecke --- fabrics.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fabrics.c b/fabrics.c index 546f5c82..646e6b22 100644 --- a/fabrics.c +++ b/fabrics.c @@ -667,12 +667,11 @@ int nvmf_disconnect(const char *desc, int argc, char **argv) } ret = nvme_disconnect_ctrl(c); if (!ret) - printf("Disconnected %s\n", - nvme_ctrl_get_name(c)); + printf("Disconnected %s\n", p); else nvme_msg(LOG_ERR, "Failed to disconnect %s: %s\n", - nvme_ctrl_get_name(c), strerror(errno)); + p, strerror(errno)); } } nvme_free_tree(r); -- 2.50.1