Skip to content

Commit 7d14b6d

Browse files
committed
tree: Skip invalid pointer when scanning topology
Do not try to dereference a NULL pointer. Just ignore it. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 5d7b210 commit 7d14b6d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/nvme/tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ static int nvme_scan_topology(struct nvme_root *r, nvme_scan_filter_t f)
8686
if (!c) {
8787
nvme_msg(LOG_DEBUG, "failed to scan ctrl %s: %s\n",
8888
ctrls[i]->d_name, strerror(errno));
89+
continue;
8990
}
9091
if ((f) && !f(c->s)) {
9192
nvme_free_ctrl(c);

0 commit comments

Comments
 (0)