Skip to content

Commit

Permalink
tree: fix segfault in nvme_scan_subsystem()
Browse files Browse the repository at this point in the history
The wrong nvme_subsystem struct was being passed to
__nvme_subsystem_scan() which caused it to segfault.
Fix it.

Fixes: d08fd10 ("make __nvme_scan_subsystem() returning bool")
Signed-off-by: Martin George <[email protected]>
  • Loading branch information
martin-gpy authored and igaw committed Aug 9, 2023
1 parent d08fd10 commit 3564474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nvme/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ static int nvme_scan_subsystem(struct nvme_root *r, const char *name,
continue;
if (strcmp(_s->name, name))
continue;
if (!__nvme_scan_subsystem(r, s, f, f_args)) {
if (!__nvme_scan_subsystem(r, _s, f, f_args)) {
errno = -EINVAL;
goto out_free;
}
Expand Down

0 comments on commit 3564474

Please sign in to comment.