]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: avoid segfault in show-topology
authorMartin George <marting@netapp.com>
Thu, 1 Aug 2024 19:02:27 +0000 (00:32 +0530)
committerDaniel Wagner <wagi@monom.org>
Fri, 2 Aug 2024 06:28:22 +0000 (08:28 +0200)
commitea015e9b6cb10527e55bbf0f7b01640a370632d4
treeda20516da5c0d375403a7846dc82a6c731e27252
parent353e0fb908beb80fd4fdeb7057b3a9cc90474c3d
nvme: avoid segfault in show-topology

The show-topology command currently ends in a segfault for
ENOENT scenarios:

nvme show-topology
Failed to scan topology: No such file or directory
Segmentation fault (core dumped)

Fix this by eliminating the call to nvme_free_tree() since the
cleanup helper is already available here.

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