Skip to content

Commit ea015e9

Browse files
martin-gpyigaw
authored andcommitted
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>
1 parent 353e0fb commit ea015e9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

nvme.c

-1
Original file line numberDiff line numberDiff line change
@@ -9585,7 +9585,6 @@ static int show_topology_cmd(int argc, char **argv, struct command *command, str
95859585
err = nvme_scan_topology(r, NULL, NULL);
95869586
if (err < 0) {
95879587
nvme_show_error("Failed to scan topology: %s", nvme_strerror(errno));
9588-
nvme_free_tree(r);
95899588
return err;
95909589
}
95919590

0 commit comments

Comments
 (0)