Commit c7b67e0
committed
tree: avoid segfault if subsysnqn is not available
A nvme config command specifying the -M & -J options would end
up in a segfault if subsysnqn is NULL, as shown below:
nvme config -M -J /etc/nvme/config.json
Segmentation fault (core dumped)
Avoid this segfault by proceeding with the subsysnqn strcmp in
nvme_lookup_subsystem() only if subsysnqn is available.
Signed-off-by: Martin George <[email protected]>1 parent 904b3a3 commit c7b67e0
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
0 commit comments