]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
fabrics: avoid potential segfault in nvmf_dim()
authorMartin George <marting@netapp.com>
Thu, 1 Aug 2024 19:07:12 +0000 (00:37 +0530)
committerDaniel Wagner <wagi@monom.org>
Fri, 2 Aug 2024 06:28:22 +0000 (08:28 +0200)
Eliminate the call to nvme_free_tree() in nvmf_dim() since the
cleanup helper is already available here.

Signed-off-by: Martin George <marting@netapp.com>
fabrics.c

index 438604ac7ae4d1d9585ebe88584aca71c48d180c..db1b7cb0411357af3224ab87f1124fe816975447 100644 (file)
--- a/fabrics.c
+++ b/fabrics.c
@@ -1455,7 +1455,6 @@ int nvmf_dim(const char *desc, int argc, char **argv)
                                fprintf(stderr,
                                        "Did not find device %s: %s\n",
                                        p, nvme_strerror(errno));
-                               nvme_free_tree(r);
                                return -errno;
                        }
                        dim_operation(c, tas, p);